Fixed not starting Hystrix span
This commit is contained in:
@@ -55,7 +55,7 @@ public abstract class TraceCommand<R> extends HystrixCommand<R> {
|
||||
this.traceKeys.getHystrix().getCommandGroup(), getCommandGroup().name());
|
||||
span.tag(this.traceKeys.getHystrix().getPrefix() +
|
||||
this.traceKeys.getHystrix().getThreadPoolKey(), getThreadPoolKey().name());
|
||||
try (Tracer.SpanInScope ws = this.tracer.withSpanInScope(span)) {
|
||||
try (Tracer.SpanInScope ws = this.tracer.withSpanInScope(span.start())) {
|
||||
return doRun();
|
||||
}
|
||||
finally {
|
||||
|
||||
@@ -70,6 +70,8 @@ public class TraceCommandTests {
|
||||
then(this.reporter.getSpans()).hasSize(1);
|
||||
then(this.reporter.getSpans().get(0).tags())
|
||||
.containsEntry("commandKey", "traceCommandKey");
|
||||
then(this.reporter.getSpans().get(0).duration())
|
||||
.isGreaterThan(0L);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user