opentracing / specification

A place to document (and discuss) the OpenTracing specification. 🛑 This project is DEPRECATED! https://github.com/opentracing/specification/issues/163
http://opentracing.io/spec
Apache License 2.0
1.17k stars 182 forks source link

Clarify if null values are considered valid tag values? #158

Open slto opened 3 years ago

slto commented 3 years ago

Background

We are testing with java-span-reporter as our tracer: https://github.com/opentracing-contrib/java-span-reporter

We noticed if we call setTag on a span with non-null key and a null value, we get an exception. If we switch to Jaeger java tracer, there is no exception.

Problem

I cannot find a clear statement in the OpenTracing spec whether null values are allowed for span tags. If this is left to the tracer implementation it would easily break the ability to switch tracers as the caller might have started with Jaeger tracer and not been checking for null values when calling setTag.

This seems to suggest you can't call setTag with null as a mechanism to "delete" a tag, but not clear if you can pass null tag value in the initial call: https://github.com/open-telemetry/opentelemetry-go/issues/53#issuecomment-511546062

Proposal

Indicate in the specification whether an OpenTracing compliant tracer needs to accept a null tag value

Questions to address

mustafaakin commented 1 year ago

Has seen it with Datadog implementation today so it'd be nice to get a clarification.