instana / instana-java-opentracing

Instana Java OpenTracing
MIT License
20 stars 6 forks source link

How should InstanaSpanBuilder::asChildOf treat null parent? #2

Closed elgris closed 7 years ago

elgris commented 7 years ago

Hi! I have a question about behaviour of InstanaSpanBuilder::asChildOf method .

    public Tracer.SpanBuilder asChildOf(BaseSpan<?> parent) {
        return asChildOf(parent.context());
    }

Should it treat null parent as noop? At least, official Opentracing definition if Tracer interface suggests that.

CodingFabian commented 7 years ago

You are right. this clarification was added in 0.30 of opentracing. We clearly do not reflect that (worse, it would null pointer at the moment)

CodingFabian commented 7 years ago

pushed as 0.30.1 into sonatype, syncing to central now.

Thanks for your report!