Moved span starting to SpanCreator

This commit is contained in:
Marcin Grzejszczak
2018-02-13 10:08:20 +01:00
parent 561a39370d
commit a37b79c0e5
2 changed files with 2 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ class DefaultSpanCreator implements SpanCreator {
log.debug("For the class [" + pjp.getThis().getClass() + "] method "
+ "[" + pjp.getMethod().getName() + "] will name the span [" + changedName + "]");
}
return this.tracer.tracer().nextSpan().name(changedName);
return this.tracer.tracer().nextSpan().name(changedName).start();
}
}

View File

@@ -195,7 +195,7 @@ class SleuthInterceptor implements IntroductionInterceptor, BeanFactoryAware {
}
Span span = tracing().tracer().currentSpan();
if (newSpan != null || span == null) {
span = spanCreator().createSpan(invocation, newSpan).start();
span = spanCreator().createSpan(invocation, newSpan);
}
String log = log(continueSpan);
boolean hasLog = StringUtils.hasText(log);