opentracing/specification

Clarify if null values are considered valid tag values?

slto opened this issue · 1 comments

slto commented

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:
open-telemetry/opentelemetry-go#53 (comment)

Proposal

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

Questions to address

  • Are null values allowed for span tags as part of the specification?

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