micronaut-projects / micronaut-tracing

Distributed Tracing Support
Apache License 2.0
18 stars 27 forks source link

Document MDC usage in user documentation #282

Open RiccardoManzan opened 1 year ago

RiccardoManzan commented 1 year ago

Feature description

It would be nice to have something in the description of micronaut-core and micronaut-tracing about the usage of MDC. It looks like this module is required in order to make the MDC be correctly propagated in child processes. It has been pretty difficult to find why the MDC values were not being shown by logback.

See:

scprek commented 1 year ago

I've updated some docs for logback specifically in the java OTEL instrumentation project since it's technically implemented outside of micronaut and not included by the framework (See https://github.com/micronaut-projects/micronaut-tracing/issues/166)

https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/logback/logback-mdc-1.0/library

Main readme https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/logger-mdc-instrumentation.md