spandex-project/spandex

`version` should be supported as a top-level span attribute

GregMefford opened this issue · 1 comments

Since Datadog APM treats env, service, and version as key attributes of a trace in its UI, we should allow version to also be set as a top-level attribute like service and env are, rather than requiring it to be nested under the tags attribute.

https://github.com/spandex-project/spandex/blob/master/lib/span.ex#L48

hosh commented

I came here looking for this exact issue. The Datadog API specs does not have a top-level version key (even though it is a part of unified service tagging): https://docs.datadoghq.com/tracing/guide/send_traces_to_agent_by_api/

Which means that some kind of transform layer would have to be done. It is that, or modify the interface to accept a top level attribute, but automatically add it into tag attributes. What probably should happen is span creation code pulls in the default version from DD_VERSION and inject it into every span, just like the officially supported SDK.