[receiver/nginx] Enable attribute reaggregation#47489
[receiver/nginx] Enable attribute reaggregation#47489dmitryax merged 2 commits intoopen-telemetry:mainfrom
Conversation
Set reaggregation_enabled: true in metadata.yaml and mark the state attribute as recommended so it can be disabled for reaggregation. Fixes open-telemetry#46368 Part of open-telemetry#45396 Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c8268654e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Enabled: true, | ||
| NginxConnectionsCurrent: NginxConnectionsCurrentMetricConfig{ | ||
| Enabled: true, | ||
| AggregationStrategy: AggregationStrategySum, |
There was a problem hiding this comment.
Set max as default for reaggregated connection state
This change enables disabling the state attribute but keeps nginx.connections_current on the default aggregation_strategy: sum, which yields incorrect totals on that new config path. The scraper records active, reading, writing, and waiting as separate points, and active already includes the other three (the existing test fixture shows 291 = 6 + 179 + 106), so summing produces inflated values instead of the actual current connection count; using max (or forcing an explicit strategy) avoids this correctness issue.
Useful? React with 👍 / 👎.
Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
|
Note: the |
|
Thank you for your contribution @ogulcanaydogan! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. If you are getting started contributing, you can also join the CNCF Slack channel #opentelemetry-new-contributors to ask for guidance and get help. |
This PR enables the re-aggregation feature for the
nginxreceiver by:reaggregation_enabled: trueinmetadata.yamlstateattribute asrecommendedso it can be disabled by users for reaggregationThe
stateattribute (active/reading/writing/waiting) is used only bynginx.connections_current. Marking itrecommendedmeans it is enabled by default (preserving current behavior) but can be disabled via config to aggregate across all states.Generated files under
internal/metadata/were regenerated withgo generate ./...followed bygoimports -w(asmake generatedoes at the root).Fixes #46368
Part of #45396