Skip to content

[SDK] Support LoggerConfigurator updates and example#4224

Open
dbarker wants to merge 3 commits into
open-telemetry:mainfrom
dbarker:add_logger_configurator_update_and_example
Open

[SDK] Support LoggerConfigurator updates and example#4224
dbarker wants to merge 3 commits into
open-telemetry:mainfrom
dbarker:add_logger_configurator_update_and_example

Conversation

@dbarker

@dbarker dbarker commented Jul 8, 2026

Copy link
Copy Markdown
Member

Fixes # (issue)

Adds the ability to update a LoggerConfigurator (and existing loggers' LoggerConfig) at runtime. Following the pattern used in #4065.

This implements the optional requirement to allow updating the LoggerProvider's LoggerConfigurator : https://opentelemetry.io/docs/specs/otel/logs/sdk/#loggerconfigurator

Changes

  • Adds UpdateLoggerConfigurator to LoggerProvider to support setting new logger configs at runtime
  • Adds test and an example

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@dbarker dbarker changed the title [SDK] Support Logger configurator updates and example [SDK] Support LoggerConfigurator updates and example Jul 8, 2026
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.28571% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.81%. Comparing base (f7120b3) to head (12c33e7).

Files with missing lines Patch % Lines
sdk/src/logs/logger_context.cc 60.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4224      +/-   ##
==========================================
+ Coverage   82.79%   82.81%   +0.03%     
==========================================
  Files         415      415              
  Lines       17452    17472      +20     
==========================================
+ Hits        14447    14468      +21     
+ Misses       3005     3004       -1     
Files with missing lines Coverage Δ
sdk/src/logs/logger.cc 90.52% <100.00%> (+0.43%) ⬆️
sdk/src/logs/logger_provider.cc 91.08% <100.00%> (+1.95%) ⬆️
sdk/src/logs/logger_context.cc 93.94% <60.00%> (-6.06%) ⬇️

... and 2 files with indirect coverage changes

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

@dbarker dbarker marked this pull request as ready for review July 8, 2026 22:39
@dbarker dbarker requested a review from a team as a code owner July 8, 2026 22:39
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.

1 participant