Skip to content

ROX-33335: adds more file activity detection metrics#19188

Draft
Stringy wants to merge 1 commit intomasterfrom
giles/ROX-33335-add-file-activity-metrics
Draft

ROX-33335: adds more file activity detection metrics#19188
Stringy wants to merge 1 commit intomasterfrom
giles/ROX-33335-add-file-activity-metrics

Conversation

@Stringy
Copy link
Contributor

@Stringy Stringy commented Feb 25, 2026

Description

change me!

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

change me!

@openshift-ci
Copy link

openshift-ci bot commented Feb 25, 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

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="sensor/common/filesystem/pipeline/pipeline.go" line_range="181" />
<code_context>
 				return
 			}
 			event := p.translate(fs)
+			if event != nil {
+				detectorMetrics.ObserveFileAccessEventReceived()
+			}
</code_context>
<issue_to_address>
**question:** Metric semantics may undercount events that are dropped by translation

This counter is only updated when `translate` returns a non‑nil event, so FACT events dropped/filtered by `translate` (e.g., unsupported/invalid) are not counted. If the metric is meant to report all raw FACT events entering the pipeline, consider incrementing it before translation, or always incrementing it and adding a separate metric for dropped/invalid events.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

return
}
event := p.translate(fs)
if event != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Metric semantics may undercount events that are dropped by translation

This counter is only updated when translate returns a non‑nil event, so FACT events dropped/filtered by translate (e.g., unsupported/invalid) are not counted. If the metric is meant to report all raw FACT events entering the pipeline, consider incrementing it before translation, or always incrementing it and adding a separate metric for dropped/invalid events.

@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 427dfdf.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-175-g427dfdfdfa.

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 4.54545% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.55%. Comparing base (d6b0da7) to head (427dfdf).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
pkg/queue/queue.go 0.00% 10 Missing and 3 partials ⚠️
sensor/common/detector/detector.go 0.00% 5 Missing ⚠️
sensor/common/detector/queue/queue.go 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19188   +/-   ##
=======================================
  Coverage   49.54%   49.55%           
=======================================
  Files        2674     2675    +1     
  Lines      201755   201842   +87     
=======================================
+ Hits        99964   100017   +53     
- Misses      94335    94361   +26     
- Partials     7456     7464    +8     
Flag Coverage Δ
go-unit-tests 49.55% <4.54%> (+<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.

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