diff --git a/instrumentation/logback/logback-mdc-1.0/library/README.md b/instrumentation/logback/logback-mdc-1.0/library/README.md index e2d1de2391d5..80a7fac56a98 100644 --- a/instrumentation/logback/logback-mdc-1.0/library/README.md +++ b/instrumentation/logback/logback-mdc-1.0/library/README.md @@ -80,3 +80,30 @@ If you set `true` in your `logback.xml` configuration, key/value pairs in [baggage](https://opentelemetry.io/docs/concepts/signals/baggage/) will also be added to the MDC. - `baggage.` + +### Using the OpenTelemetryAppender together with the AsyncAppender + +When using the `AsyncAppender`, it is important that the `OpenTelemetryAppender` be called first before the `AsyncAppender`. Otherwise, the trace id and span id for the particular log event will be lost. An example configuration would be: + +```xml + + + + + %d{HH:mm:ss.SSS} trace_id=%X{trace_id} span_id=%X{span_id} trace_flags=%X{trace_flags} %msg%n + + + + + + + + + + + + + + + +```