small fixes due to ES instrumentation

This commit is contained in:
renaudboutet 2017-05-24 09:21:41 +02:00
parent 1cd1183f07
commit 5239736d14
2 changed files with 2 additions and 3 deletions

View File

@ -81,7 +81,6 @@ AT ENTRY
IF currentSpan() == null IF currentSpan() == null
DO DO
span = getTracer().buildSpan($2.getClass().getSimpleName()) span = getTracer().buildSpan($2.getClass().getSimpleName())
.asChildOf()
.withTag(io.opentracing.tag.Tags.SPAN_KIND.getKey(), io.opentracing.tag.Tags.SPAN_KIND_CLIENT) .withTag(io.opentracing.tag.Tags.SPAN_KIND.getKey(), io.opentracing.tag.Tags.SPAN_KIND_CLIENT)
.start(); .start();
# decorator.onRequest(span); # decorator.onRequest(span);

View File

@ -238,7 +238,7 @@ public class DDTracer implements io.opentracing.Tracer {
} }
public DDTracer.DDSpanBuilder asChildOf(Span span) { public DDTracer.DDSpanBuilder asChildOf(Span span) {
return asChildOf(span.context()); return asChildOf(span==null? null : span.context());
} }
public DDTracer.DDSpanBuilder asChildOf(SpanContext spanContext) { public DDTracer.DDSpanBuilder asChildOf(SpanContext spanContext) {