Skip to content

docs: add MDC attribute capture to Spring Boot example#134

Merged
ashishl9 merged 1 commit intomainfrom
docs/java-enable-logs-mdc-capture
Apr 20, 2026
Merged

docs: add MDC attribute capture to Spring Boot example#134
ashishl9 merged 1 commit intomainfrom
docs/java-enable-logs-mdc-capture

Conversation

@prathamesh-sonpatki
Copy link
Copy Markdown
Member

Summary

  • Added OTEL_INSTRUMENTATION_LOGBACK_APPENDER_EXPERIMENTAL_CAPTURE_MDC_ATTRIBUTES=* to java/springboot/env.example
  • Includes documentation comment explaining the config

Context

Without this config, the OTEL Java agent does not capture Logback MDC attributes (requestId, transactionId, correlationId) as log record attributes.

Test plan

  • Verify env.example is valid and comments are clear

🤖 Generated with Claude Code

Add OTEL_INSTRUMENTATION_LOGBACK_APPENDER_EXPERIMENTAL_CAPTURE_MDC_ATTRIBUTES
to env.example so MDC context (requestId, transactionId, correlationId)
is captured as log record attributes by default.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@ashishl9 ashishl9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! All checks passing.

@ashishl9 ashishl9 merged commit 43f1a67 into main Apr 20, 2026
8 checks passed
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