open-telemetry / opentelemetry-java-instrumentation

OpenTelemetry auto-instrumentation and instrumentation libraries for Java
https://opentelemetry.io
Apache License 2.0
1.79k stars 782 forks source link

Logback OpenTelemetryAppender does not capture logger name as attribute #11670

Open YuriyHolinko opened 3 days ago

YuriyHolinko commented 3 days ago

OpenTelemetryAppender does not allow us to enrich log records with logger name.

The only possible approach is to have the logger name attribute in log record is to use MDC, which is overhead imho.

We can add the functionality to the OpenTelemetryAppender to enrich log record with logger name attribute.

jeanbisutti commented 3 days ago

With the Logback OpenTelemetryAppender, you can have access to the logger name from the instrumentation scope of the log record.

YuriyHolinko commented 2 days ago

thanks for the attention, I will check and reply