-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Metric-Specific Labels to googlecloudmonitoringreceiver Metrics enrichment #35711
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Oh, dang. We are completely ignoring/dropping metric labels: opentelemetry-collector-contrib/receiver/googlecloudmonitoringreceiver/receiver.go Lines 301 to 323 in 27aa54b
|
@abhishek-at-cloudwerx is this something you were planning to do? |
Started using this receiver at my organization - Not adding the metric label can cause miss-reporting; You can see this in the metric I don't have enough knowledge of Open Telemetry's internals to know if thats an issue or not, but we're using the |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Fixed by ##35828. Unit tests to follow |
…open-telemetry#35828) #### Description Add metric-specific labels inside the googlecloudmonitoringreceiver component #### Link to tracking issue open-telemetry#35711 #### Testing #### Documentation
…open-telemetry#35828) #### Description Add metric-specific labels inside the googlecloudmonitoringreceiver component #### Link to tracking issue open-telemetry#35711 #### Testing #### Documentation
Component(s)
receiver/googlecloudmonitoring
Is your feature request related to a problem? Please describe.
The Google Cloud Monitoring Receiver currently enriches metrics with resource-level tags but lacks metric-specific labels (e.g.,
nat_ip
for NAT gateway metrics). Without these labels, users miss crucial context directly related to the metric, limiting filtering and grouping capabilities when monitoring specific resources. Including these metric labels would enhance usability by allowing more precise filter, grouping and tracking based on metric-specific attributes.Describe the solution you'd like
I propose updating the
convertGCPTimeSeriesToMetrics
function (here) within thegooglecloudmonitoringreceiver/receiver.go
file to capture and append metric-specific labels alongside resource tags. Specifically, this enhancement would add metric labels fromtimeSeries.Metric.Labels
to the metric attributes, enriching each metric with both resource and metric-specific context.Suggested Code:
This code snippet ensures that metric-specific labels are added only if they are present.
Describe alternatives you've considered
Custom Processor: We considered building a custom processor to add metric labels post-collection. Howeever, this approach requires additional processing steps and does not fully integrate with the Google Cloud Monitoring Receiver.
Additional context
This feature request aims to improve the observability and filtering options for users relying on GoogleCloudMonitoring metrics. By incorporating metric labels, we offer a more complete metric context without adding significant overhead or complexity. If this aligns with the project's goal, I am ready to contribute by implementing this feature in a PR.
The text was updated successfully, but these errors were encountered: