diff --git a/jaeger-core/README.md b/jaeger-core/README.md index 6619adc18..909f4b653 100644 --- a/jaeger-core/README.md +++ b/jaeger-core/README.md @@ -164,7 +164,8 @@ MDCScopeManager scopeManager = new MDCScopeManager Then instantiate the Jaegar Tracer with the MDCScopeManager: ```java -JaegerTracer.Builder("serviceName").withScopeManager(scopeManager).build(); +JaegerTracer tracer = new JaegerTracer.Builder("serviceName") + .withScopeManager(scopeManager).build(); ``` In order to have the trace info in the logs, a logging system that offers MDC functionality, such as log4j, needs to be configured with an appender containing a proper PatternLayout. @@ -193,6 +194,21 @@ might produce a log line like this: [DEBUG] 2020-06-28 22:25:07.152 [main] LogExample - Your log message traceId=729b37ccf9c1549d spanId=729b37ccf9c1549d sampled=false ``` +The Logstash configuration might look like this: + +```xml + + + traceId + spanId + sampled + + + + + +``` + ## Development Especially in unit tests, it's useful to have tracer that is not connected to tracing backend, but collects