File tree Expand file tree Collapse file tree
java/com/baeldung/spring/session Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public void doSomeWorkSameSpan() throws InterruptedException {
2828 public void doSomeWorkNewSpan () throws InterruptedException {
2929 logger .info ("I'm in the original span" );
3030
31- Span newSpan = tracer .newTrace ().name ("newSpan" ).start ();
31+ Span newSpan = tracer .nextSpan ().name ("newSpan" ).start ();
3232 try (SpanInScope ws = tracer .withSpanInScope (newSpan .start ())) {
3333 Thread .sleep (1000L );
3434 logger .info ("I'm in the new span doing some cool work that needs its own span" );
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <configuration >
3- <appender name =" STDOUT" class =" ch.qos.logback.core.ConsoleAppender" >
4- <encoder >
5- <pattern >%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
6- </pattern >
7- </encoder >
8- </appender >
92
10- <root level =" INFO" >
11- <appender-ref ref =" STDOUT" />
12- </root >
3+ <!-- this is the configuration needed for the Sleuth examples;
4+ don't override this with the standard logback config
5+ -->
6+
7+ <configuration >
8+ <include resource =" org/springframework/boot/logging/logback/base.xml" />
9+ <logger name =" feign" level =" DEBUG" />
10+ <logger name =" org.springframework.cloud.sleuth" level =" TRACE" />
11+ <logger name =" org.springframework.boot.autoconfigure.logging" level =" INFO" />
12+ <logger name =" org.springframework.cloud.sleuth.log" level =" DEBUG" />
13+ <logger name =" org.springframework.cloud.sleuth.trace" level =" DEBUG" />
14+ <logger name =" org.springframework.cloud.sleuth.instrument.rxjava" level =" DEBUG" />
15+ <logger name =" org.springframework.cloud.sleuth.instrument.reactor" level =" TRACE" />
16+ <root level =" INFO" >
17+ <appender-ref ref =" CONSOLE" />
18+ <appender-ref ref =" FILE" />
19+ </root >
1320</configuration >
You can’t perform that action at this time.
0 commit comments