Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

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

Open
slto opened this issue Oct 1, 2020 · 1 comment
Open

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

slto opened this issue Oct 1, 2020 · 1 comment

Comments

@slto
Copy link

slto commented Oct 1, 2020

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?
@mustafaakin
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants