fix sleuth ex

This commit is contained in:
Loredana
2019-03-03 17:59:20 +02:00
parent 0266120fd3
commit 1475c3e32d
2 changed files with 18 additions and 11 deletions
@@ -28,7 +28,7 @@ public class SleuthService {
public void doSomeWorkNewSpan() throws InterruptedException {
logger.info("I'm in the original span");
Span newSpan = tracer.newTrace().name("newSpan").start();
Span newSpan = tracer.nextSpan().name("newSpan").start();
try (SpanInScope ws = tracer.withSpanInScope(newSpan.start())) {
Thread.sleep(1000L);
logger.info("I'm in the new span doing some cool work that needs its own span");