Skip to content

Conversation

@axw
Copy link
Contributor

@axw axw commented Sep 4, 2025

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.Providers interface 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

@codecov
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

❌ Patch coverage is 90.59829% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.41%. Comparing base (66f2c45) to head (7b6d411).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
service/telemetry/otelconftelemetry/telemetry.go 76.47% 6 Missing and 2 partials ⚠️
service/telemetry/otelconftelemetry/resource.go 80.00% 2 Missing and 1 partial ⚠️

❌ 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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@axw axw force-pushed the telemetry-interface-take2-prep branch from 85e6c53 to c41cbb6 Compare September 4, 2025 11:41
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.
@axw axw force-pushed the telemetry-interface-take2-prep branch from c41cbb6 to 32ca2e5 Compare September 4, 2025 12:02
@axw
Copy link
Contributor Author

axw commented Sep 4, 2025

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.

@axw
Copy link
Contributor Author

axw commented Sep 8, 2025

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 })},
Copy link
Member

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?

Copy link
Contributor Author

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.

@axw axw requested a review from mx-psi September 11, 2025 00:15
@mx-psi mx-psi added this pull request to the merge queue Sep 11, 2025
Merged via the queue into open-telemetry:main with commit 32475fd Sep 11, 2025
56 of 57 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 11, 2025
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.

3 participants