COO-1614: feat: APM dashboard: support normalized metric names#1043
COO-1614: feat: APM dashboard: support normalized metric names#1043andreasgerstmayr wants to merge 1 commit intorhobs:mainfrom
Conversation
|
@andreasgerstmayr: This pull request references COO-1614 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature request to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: andreasgerstmayr The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @andreasgerstmayr. Thanks for your PR. I'm waiting for a rhobs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughPromQL queries in the APM controller were updated to use regex-based metric name selection for span call and duration metrics (optional suffixes supported), and related request/error rate, operation duration, histogram, and dashboard variable matcher queries were adjusted. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.11.4)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@andreasgerstmayr: This pull request references COO-1614 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature request to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
98fb77b to
c006ea2
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pkg/controllers/uiplugin/apm.go`:
- Line 137: The PromQL expression in the query string divides per-series rates
before aggregating, producing a sum of per-series averages; update the
expression in the code that builds the query (the line using fmt.Sprintf with
variableMatchers and span_name) to compute the overall average by dividing two
aggregates: sum(rate(..._sum[5m])) by (span_name) divided by
sum(rate(..._count[5m])) by (span_name), keeping the same metric name regex and
variableMatchers placeholders so you aggregate sums and counts per span_name
before dividing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7999b4d8-fe88-4900-8c64-7fad9730dffd
📒 Files selected for processing (1)
pkg/controllers/uiplugin/apm.go
Support normalized Prometheus metric names in the APM dashboard, for example traces_span_metrics_calls_total for the traces.span.metrics.calls OTEL metric. Ref. https://redhat.atlassian.net/browse/COO-1614 Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
c006ea2 to
fb31eab
Compare
Support normalized Prometheus metric names in the APM dashboard, for example
traces_span_metrics_calls_totalfor thetraces.span.metrics.callsOTEL metric.Ref. https://redhat.atlassian.net/browse/COO-1614