Skip to content

ROX-28151: Custom Prometheus metrics configuration#15742

Closed
parametalol wants to merge 4 commits intomasterfrom
michael/ROX-28151-configuration
Closed

ROX-28151: Custom Prometheus metrics configuration#15742
parametalol wants to merge 4 commits intomasterfrom
michael/ROX-28151-configuration

Conversation

@parametalol
Copy link
Copy Markdown
Contributor

@parametalol parametalol commented Jun 16, 2025

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!

Current dependencies on/for this PR:

Copy link
Copy Markdown
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 @parametalol - 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.

@rhacs-bot
Copy link
Copy Markdown
Contributor

Images are ready for the commit at 0772cf4.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.9.x-48-g0772cf4491.

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 16, 2025

Codecov Report

Attention: Patch coverage is 92.00000% with 10 lines in your changes missing coverage. Please review.

Project coverage is 48.82%. Comparing base (a2a1a18) to head (0772cf4).
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
central/config/service/service.go 37.50% 5 Missing ⚠️
central/metrics/aggregator/common/expression.go 50.00% 2 Missing and 1 partial ⚠️
central/metrics/aggregator/common/condition.go 96.29% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #15742      +/-   ##
==========================================
+ Coverage   48.80%   48.82%   +0.02%     
==========================================
  Files        2590     2595       +5     
  Lines      190492   190629     +137     
==========================================
+ Hits        92968    93079     +111     
- Misses      90227    90246      +19     
- Partials     7297     7304       +7     
Flag Coverage Δ
go-unit-tests 48.82% <92.00%> (+0.02%) ⬆️

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.

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Jun 16, 2025

@parametalol: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/gke-qa-e2e-tests 0772cf4 link false /test gke-qa-e2e-tests
ci/prow/ocp-4-18-qa-e2e-tests 0772cf4 link false /test ocp-4-18-qa-e2e-tests
ci/prow/ocp-4-12-qa-e2e-tests 0772cf4 link false /test ocp-4-12-qa-e2e-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

// }
// }
// }
Metrics image_vulnerabilities = 1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Avoid plural if there is no repeated. How about MetricGroup?

Copy link
Copy Markdown
Contributor

@vikin91 vikin91 left a comment

Choose a reason for hiding this comment

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

Posting comments as meeting notes, not an actual review.


message Metrics {
// The period (in minutes) at which vulnerability data is gathered from the DB.
uint32 gathering_period_minutes = 1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider using duration type to avoid setting like 67392 and get 345h instead.

label, metric, slices.Sorted(maps.Keys(labelOrder)))
}

var expr Expression
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why can't we use []*Condition here? It makes the reader to first search what is an Expression to understand what is happening here.

// data from another.
string registry_name = 3;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Notes from simplification discussion:

message Metric {
  repeated string labels = 1; // that strings would be hardcoded by us
  
}

message MetricsGroup {
  repeated Metric metrics = 1;
  uint32 gathering_period = 2;
  string filter = 3;
}

@parametalol parametalol marked this pull request as draft June 17, 2025 13:13
@parametalol parametalol deleted the michael/ROX-28151-configuration branch September 17, 2025 10:04
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.

3 participants