Skip to content
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

feat(otel): copy service labels into GCM Metric #14930

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

dbolduc
Copy link
Member

@dbolduc dbolduc commented Jan 10, 2025

Fixes #14823

Credit to @IcySteam for raising the issue, and offering a fix for it in #14825. I also stole their tests. 😄


Copy several well-known service labels from the resource into the metric, if they exist.

This avoids duplicate timeseries when multiple instances of a service are running on a single monitored resource, for example running multiple service processes on a single GCE VM.


This change is Reviewable

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.91%. Comparing base (cb71d54) to head (0e0eac5).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14930   +/-   ##
=======================================
  Coverage   92.91%   92.91%           
=======================================
  Files        2351     2351           
  Lines      209811   209811           
=======================================
+ Hits       194948   194952    +4     
+ Misses      14863    14859    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dbolduc dbolduc marked this pull request as ready for review January 13, 2025 16:27
@dbolduc dbolduc requested a review from a team as a code owner January 13, 2025 16:27
@dbolduc dbolduc merged commit 3018564 into googleapis:main Jan 13, 2025
73 checks passed
@dbolduc dbolduc deleted the otel-gcm-exporter-metric-labels branch January 13, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OTel "service.*" resource labels are not exported to Google Cloud Monitoring
2 participants