Moved span starting to SpanCreator
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user