Skip to content

feat: Global logger functionality#3347

Open
Kile-Asmussen wants to merge 3 commits intoopen-telemetry:mainfrom
Kile-Asmussen:global-logger
Open

feat: Global logger functionality#3347
Kile-Asmussen wants to merge 3 commits intoopen-telemetry:mainfrom
Kile-Asmussen:global-logger

Conversation

@Kile-Asmussen
Copy link

@Kile-Asmussen Kile-Asmussen commented Feb 9, 2026

Implements #3346

GitHub has accidentally removed the ability to edit PR titles, and I forgot the "feat:" tag in the title. (EDIT: Thanks @utpilla)

Changes

Adds the global::logs module containing:

  • Dyn-compatible wrapper traits for LoggerProvider, Logger, and LogRecord
  • Boxed dynamic-dispatch versions of Logger and LogRecord: BoxedLogger, BoxedLogRecord
  • A global dynamic-dispatch LoggerProvider: GlobalLoggerProvider
  • Helper functions

All of this functionality is analogous to the other global modules.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
    • N/A: none of the other global modules have tests
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@Kile-Asmussen Kile-Asmussen requested a review from a team as a code owner February 9, 2026 11:14
@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 0% with 150 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.7%. Comparing base (0948c61) to head (e270e3c).

Files with missing lines Patch % Lines
opentelemetry/src/global/logs.rs 0.0% 150 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3347     +/-   ##
=======================================
- Coverage   82.2%   81.7%   -0.5%     
=======================================
  Files        128     129      +1     
  Lines      24510   24660    +150     
=======================================
+ Hits       20154   20155      +1     
- Misses      4356    4505    +149     

☔ 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.

@Kile-Asmussen
Copy link
Author

@cijothomas
@mehrdadbn9

@mehrdadbn9
Copy link

mehrdadbn9 commented Feb 9, 2026 via email

@Kile-Asmussen
Copy link
Author

@mehrdadbn9 You showed some interest in the conversation in #3346 so I thought I'd call your attention to this one ^^

@utpilla utpilla changed the title Global logger functionality feat: Global logger functionality Feb 9, 2026
@mehrdadbn9
Copy link

mehrdadbn9 commented Feb 9, 2026 via email

@cijothomas
Copy link
Member

See #3346 (comment)

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