Skip to content

ROX-33267: Metrics to keep track of pruned process indicators#19130

Open
JoukoVirtanen wants to merge 6 commits intojv-ROX-32873-metrics-for-process-argumentsfrom
jv-ROX-33267-metrics-to-keep-track-of-pruned-process-indicators
Open

ROX-33267: Metrics to keep track of pruned process indicators#19130
JoukoVirtanen wants to merge 6 commits intojv-ROX-32873-metrics-for-process-argumentsfrom
jv-ROX-33267-metrics-to-keep-track-of-pruned-process-indicators

Conversation

@JoukoVirtanen
Copy link
Contributor

@JoukoVirtanen JoukoVirtanen commented Feb 22, 2026

Description

Prior to this PR there was already a metric for keeping track of how many process indicators are pruned because they are too similar. That metric is called stackrox_central_pruned_process_indicators.

This PR renames the metric to rocess_indicators_removed and makes it so that it takes a parameter which is the reason for the removal. Now anytime that a process indicator is removed the metric is incremented, not just when process indicators are removed due to similarity of process arguments. Another metric process_indicators_removed_total keeps track of the total number of process indicators removed for any reason.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

Tested manually. Deployed ACS. Checked the metrics

$ kubectl -n stackrox port-forward deploy/central 9090:9090 > /dev/null 2>&1 &
$ curl http://localhost:9090/metrics
# HELP rox_central_process_indicators_removed Number of process indicators removed from the database, broken down by reason
# TYPE rox_central_process_indicators_removed counter
rox_central_process_indicators_removed{reason="pod_deletion"} 78
# HELP rox_central_process_indicators_removed_total Total number of process indicators removed from the database across all reasons
# TYPE rox_central_process_indicators_removed_total counter
rox_central_process_indicators_removed_total 78

@openshift-ci
Copy link

openshift-ci bot commented Feb 22, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Feb 22, 2026

Images are ready for the commit at 30ca3db.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-314-g30ca3db6f4.

@JoukoVirtanen JoukoVirtanen removed the request for review from erthalion February 22, 2026 03:57
@JoukoVirtanen JoukoVirtanen force-pushed the jv-ROX-33267-metrics-to-keep-track-of-pruned-process-indicators branch 2 times, most recently from a573092 to 7d35ef3 Compare February 23, 2026 02:16
@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.65%. Comparing base (3ce4c0a) to head (30ca3db).

Files with missing lines Patch % Lines
...ntral/processindicator/datastore/datastore_impl.go 81.25% 2 Missing and 1 partial ⚠️
central/detection/lifecycle/manager_impl.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                             Coverage Diff                             @@
##           jv-ROX-32873-metrics-for-process-arguments   #19130   +/-   ##
===========================================================================
  Coverage                                       49.64%   49.65%           
===========================================================================
  Files                                            2698     2698           
  Lines                                          203088   203101   +13     
===========================================================================
+ Hits                                           100832   100851   +19     
+ Misses                                          94734    94729    -5     
+ Partials                                         7522     7521    -1     
Flag Coverage Δ
go-unit-tests 49.65% <86.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JoukoVirtanen JoukoVirtanen changed the base branch from master to jv-ROX-32873-metrics-for-process-arguments February 28, 2026 22:51
@JoukoVirtanen JoukoVirtanen force-pushed the jv-ROX-32873-metrics-for-process-arguments branch from 49ebcfa to 066620c Compare March 2, 2026 23:49
@JoukoVirtanen JoukoVirtanen force-pushed the jv-ROX-33267-metrics-to-keep-track-of-pruned-process-indicators branch 2 times, most recently from eb5c5d9 to 26f9829 Compare March 4, 2026 05:25
@JoukoVirtanen JoukoVirtanen marked this pull request as ready for review March 4, 2026 21:33
@JoukoVirtanen JoukoVirtanen requested a review from erthalion March 4, 2026 21:33
@JoukoVirtanen JoukoVirtanen force-pushed the jv-ROX-32873-metrics-for-process-arguments branch from 142c53e to 3ce4c0a Compare March 11, 2026 15:18
@JoukoVirtanen JoukoVirtanen force-pushed the jv-ROX-33267-metrics-to-keep-track-of-pruned-process-indicators branch from 677707a to 79f5280 Compare March 11, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants