Springboot集成OpenTelemetry到logback的简单介绍
作者:小码农叔叔
这篇文章主要介绍了springboot 整合 OpenTelemetry的解决方案,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧
参见:https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/logger-mdc-instrumentation.md
Logger MDC auto-instrumentation
For Spring Boot configuration which uses logback, you can add MDC to log lines by overriding only the logging.pattern.level:
logging.pattern.level = trace_id=%mdc{trace_id} span_id=%mdc{span_id} trace_flags=%mdc{trace_flags} %5p
参考:https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/logback/logback-mdc-1.0/library
MDC Instrumentation for Logback version 1.0 and higher
到此这篇关于Springboot集成OpenTelemetry到logback的文章就介绍到这了,更多相关Springboot集成OpenTelemetry到logback内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!