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

Add prometheus metric prefix and constant service attributes to otel-go prometheus exporter #6223

Merged

Conversation

paivagustavo
Copy link
Member

@paivagustavo paivagustavo commented Oct 3, 2022

Description: This wraps prometheus.Registry with the otelcol_ prefix and the service_ attributes as these are not supported directly by the OpenTelemetry Go Prometheus Exporter.

This ensures that metrics exported by otel-go is consistent with the existing opencensus metrics.

Link to tracking Issue: #5882

Testing: Manual tested by adding a otel-go metric and testing this.

service/telemetry.go Outdated Show resolved Hide resolved
Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

LGTM overall, waiting for last nits.

service/telemetry.go Outdated Show resolved Hide resolved
service/telemetry.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 3, 2022

Codecov Report

Base: 92.19% // Head: 92.17% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (dd23077) compared to base (b1e1614).
Patch coverage: 76.47% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6223      +/-   ##
==========================================
- Coverage   92.19%   92.17%   -0.02%     
==========================================
  Files         219      219              
  Lines       13475    13488      +13     
==========================================
+ Hits        12423    12433      +10     
- Misses        823      825       +2     
- Partials      229      230       +1     
Impacted Files Coverage Δ
service/telemetry.go 89.59% <76.47%> (-1.03%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@paivagustavo paivagustavo force-pushed the wrap-otel-go-prometheus-registry branch from 1761697 to 4121258 Compare October 4, 2022 16:17
@bogdandrutu bogdandrutu merged commit 00ec3d0 into open-telemetry:main Oct 4, 2022
@paivagustavo paivagustavo deleted the wrap-otel-go-prometheus-registry branch October 4, 2022 19:17
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.

2 participants