Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Guillaume Polaert 2017-05-24 10:51:40 +02:00
commit dce23a7517
2 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# --------------------------------------------------------
# --------------------------------------------------------
# Instrument mongo client
RULE Mongo Client instrumentation
CLASS com.mongodb.MongoClientOptions$Builder
@ -81,7 +81,6 @@ AT ENTRY
IF currentSpan() == null
DO
span = getTracer().buildSpan($2.getClass().getSimpleName())
.asChildOf()
.withTag(io.opentracing.tag.Tags.SPAN_KIND.getKey(), io.opentracing.tag.Tags.SPAN_KIND_CLIENT)
.start();
# decorator.onRequest(span);

View File

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