-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use the same prometheus registry for both oc and otel exporters #6297
Use the same prometheus registry for both oc and otel exporters #6297
Conversation
3cb6c6e
to
d70fae4
Compare
Codecov ReportBase: 92.03% // Head: 91.97% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #6297 +/- ##
==========================================
- Coverage 92.03% 91.97% -0.06%
==========================================
Files 218 219 +1
Lines 13203 13242 +39
==========================================
+ Hits 12151 12179 +28
- Misses 832 840 +8
- Partials 220 223 +3
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. |
Please update descriptions, and add some unit tests |
…eus-registry # Conflicts: # CHANGELOG.md
@bogdandrutu I've added some unit tests, not sure if that was the best place, open for suggestions if you have any. Also documented on the tests the differences between how both SDK exports Resource attributes. I'm not sure what is the best way for us to document this public-wise, since it can be considered as a breaking change for some. |
I would prefer proper unittests, I know we have some kind of "integration" tests there, but they are actually complicated and hard to follow. I would rather remove them and have proper unit-tests. |
Co-authored-by: Bogdan Drutu <lazy@splunk.com>
Description: Use the same
prometheus.Registry
for both OC and OTel SDK exporters.Link to tracking Issue: #5687
Testing: Added unit test and did some manual tests with and without the featuregate to ensure that nothing is broken.
Documentation: The observed difference between both exporters is how they export Resource Attributes. OpenCensus appends resource attributes to all metrics while OpenTelemetry advocates for the use of an additional
target_info
metric which contains all resource attributes and other metrics are only appended withjob
andinstance
which can be derived from theservice.name
,service.namespace
, andservice.instance.id attributes
.OTel-Go doesn't implement the
target_info
yet, but I've added some notes and TODOs to track those.