Skip to content

Added Logging SDK Context Injection and Logger Limit#435

Closed
MarkSeufert wants to merge 2 commits intoopen-telemetry:masterfrom
open-o11y:logs-sdk-update
Closed

Added Logging SDK Context Injection and Logger Limit#435
MarkSeufert wants to merge 2 commits intoopen-telemetry:masterfrom
open-o11y:logs-sdk-update

Conversation

@MarkSeufert
Copy link
Copy Markdown
Contributor

@MarkSeufert MarkSeufert commented Dec 9, 2020

Note: This PR is going to be updated once the recordable PR gets merged.

This PR makes the following additions to the logging SDK:

  • The SDK’s Logger injects the relevant fields of the LogRecord if the user didn’t specify them. The fields that get injected are timestamp, severity, traceid, spanid, and traceflags.
  • Added a logger limit to the SDK LoggerProvider (relevant spec issue), where the GetLogger(name) method returns a noop logger if the limit has been reached.
  • Unit tests for the above functionality.

The CI tests will fail until the recent API PR gets merged since it uses its trace_flag -> trace_flags change and Severity:kInvalid = 0 change.

cc - @xukaren @alolita @ThomsonTan @lalitb

@MarkSeufert
Copy link
Copy Markdown
Contributor Author

Closing this PR for now so the more pressing logging PRs (recordable, ostream exporter, batch log processor) can be reviewed before reopening this one.

GerHobbelt pushed a commit to GerHobbelt/opentelemetry-cpp that referenced this pull request Mar 6, 2026
…and-patch-dependencies

Update dependency gazelle to v0.45.0
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.

2 participants