-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[chore] otelconftelemetry: refactor internals #13765
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
[chore] otelconftelemetry: refactor internals #13765
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (90.59%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #13765 +/- ##
==========================================
- Coverage 91.43% 91.41% -0.02%
==========================================
Files 640 643 +3
Lines 42665 42711 +46
==========================================
+ Hits 39009 39044 +35
- Misses 2836 2843 +7
- Partials 820 824 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
85e6c53 to
c41cbb6
Compare
Prep work for open-telemetry#13722, to split apart the Providers interface into per-signal providers. In a followup, I will update the telemetry.Factory interface. See open-telemetry#13739 for the end result.
c41cbb6 to
32ca2e5
Compare
|
Note to reviewer: the code that's missing coverage will be deleted in a followup. It seems unnecessary to add more tests that will be shortly be deleted. Let me know if you disagree. |
|
These changes seem to reliably trigger the bug fixed by #13741, so this PR is blocked until that one is merged |
| core, observedLogs := observer.New(zapcore.DebugLevel) | ||
| set := telemetry.Settings{ | ||
| BuildInfo: tt.buildInfo, | ||
| ZapOptions: []zap.Option{zap.WrapCore(func(zapcore.Core) zapcore.Core { return core })}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the option here useful for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redirecting logs to the observer core. I'll add a comment.
32475fd
Description
Refactor the internals of the package to create independent SDKs for each of the logger, meter, and tracer providers. I have introduced new interfaces to the telemetry package to expose the Shutdown methods. This will be important once we return the providers directly - they will need to support being independently shut down.
This is prep work for #13722, to split apart the
telemetry.Providersinterface into per-signal providers. In a followup, I will update the telemetry.Factory interface. See #13739 for the end result.Link to tracking issue
Part of #13722
Testing
Unit tests only.
Documentation
N/A