Skip to content

ROX-30390: Refactor netFlowManager metrics#16624

Merged
vikin91 merged 3 commits intomasterfrom
piotr/ROX-30390-refactor-metrics
Sep 3, 2025
Merged

ROX-30390: Refactor netFlowManager metrics#16624
vikin91 merged 3 commits intomasterfrom
piotr/ROX-30390-refactor-metrics

Conversation

@vikin91
Copy link
Contributor

@vikin91 vikin91 commented Sep 2, 2025

Description

This PR isolates the metric changes form the next PR in the stack. In particular:

  • Create metric doubles (counter and gauge) as they are useful for different scenarios (counters help when investigating debug bundle data, gauges are great for grafana)
  • Add more labels to selected metrics
  • Decouple metrics recording from implementation details in selected functions

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

  • I used those metrics upper in the stack to visualize and follow behaviors of netFlowManager
  • CI should be enough to check whether we correctly set the number of labels (it would panic otherwise)

@openshift-ci
Copy link

openshift-ci bot commented Sep 2, 2025

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 Sep 2, 2025

Images are ready for the commit at 55d686a.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.9.x-660-g55d686a37c.

@vikin91 vikin91 force-pushed the piotr/ROX-30390-refactor-metrics branch from 0856d10 to ba9b353 Compare September 2, 2025 09:30
@codecov
Copy link

codecov bot commented Sep 2, 2025

Codecov Report

❌ Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.64%. Comparing base (817b235) to head (55d686a).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
sensor/common/networkflow/manager/manager_impl.go 96.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16624      +/-   ##
==========================================
- Coverage   48.67%   48.64%   -0.03%     
==========================================
  Files        2661     2661              
  Lines      198976   198994      +18     
==========================================
- Hits        96843    96801      -42     
- Misses      94545    94599      +54     
- Partials     7588     7594       +6     
Flag Coverage Δ
go-unit-tests 48.64% <96.87%> (-0.03%) ⬇️

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.

@vikin91 vikin91 force-pushed the piotr/ROX-30390-refactor-metrics branch from ba9b353 to 39fe921 Compare September 2, 2025 10:27
@vikin91 vikin91 marked this pull request as ready for review September 2, 2025 12:25
@vikin91 vikin91 requested a review from a team as a code owner September 2, 2025 12:25
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 there - I've reviewed your changes and they look great!


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.

@vikin91 vikin91 force-pushed the piotr/ROX-30390-indicator-key branch from 7d81935 to d328baa Compare September 3, 2025 07:53
@vikin91 vikin91 force-pushed the piotr/ROX-30390-refactor-metrics branch from 829c138 to ea1df6c Compare September 3, 2025 07:53
Copy link
Contributor

@lvalerom lvalerom left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from piotr/ROX-30390-indicator-key to master September 3, 2025 12:25
@vikin91 vikin91 force-pushed the piotr/ROX-30390-refactor-metrics branch from ea1df6c to 55d686a Compare September 3, 2025 12:28
@vikin91 vikin91 merged commit 2873400 into master Sep 3, 2025
141 of 169 checks passed
@vikin91 vikin91 deleted the piotr/ROX-30390-refactor-metrics branch September 3, 2025 15:11
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.

4 participants