This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/java-agent/instrumentation/logback-mdc-1.0.md.

Logback

OpenTelemetry Java agent instrumentation

This instrumentation adds trace context (trace ID, span ID, and trace flags) to the Logback MDC, it does not emit any telemetry on its own.

  • Name: logback-mdc-1.0
  • Scope: io.opentelemetry.logback-mdc-1.0
  • Target versions: ch.qos.logback:logback-classic:[1.0.0,1.2.3]
  • Library: https://logback.qos.ch/

Configuration

OptionTypeDefaultDescription
otel.instrumentation.common.logging.span-id-keystringspan_idSpecifies the key name used to store the span ID in the logging context.
otel.instrumentation.common.logging.trace-flags-keystringtrace_flagsSpecifies the key name used to store the trace flags in the logging context.
otel.instrumentation.common.logging.trace-id-keystringtrace_idSpecifies the key name used to store the trace ID in the logging context.
otel.instrumentation.common.mdc.resource-attributeslistSpecifies which resource attributes to add to the logging context as a comma-separated list of attribute keys.
otel.instrumentation.logback-mdc.add-baggagebooleanfalseEnables adding baggage entries to the Logback MDC, prefixed with "baggage.".

Data

  • JSON: /data/javaagent/instrumentations/logback-mdc-1.0/logback-mdc-1.0-db2b87919b16.json
  • Explore: /java-agent/instrumentation/logback-mdc-1.0