Introduce span type field
What are you trying to achieve?
I want my traces to have a predictable well-known identity so that I can easily do:
- filtering of traces
- Transforming traces into metrics
Another key use case raised by @jsuereth on a couple of occasions is weaver live check needing an id to identify the model. I suspect the same need would also apply to the collector schema transformer.
Initial implementation thoughts
Introduce a new field on span span_type which can be set to the model ie db.sql_server.client which is defined in semconv.
Additional context. For consistency with metrics & events we would go with span name but that field is already taken hence opting for type which is consistent with entities.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
can you give some examples of what values span type might take on? How is this different than span kind?
@jkwatson have updated the description. Span kind can't act as the identity.
can you give some examples of what values span type might take on? How is this different than span kind?
Elastic APM uses span.type and span.subtype. Here are some examples of how it's used: https://ci-artifacts.kibana.dev/storybooks/main/apm_ui_shared/index.html?path=/story/shared-spanicon--list
(this effort doesn't come from Elastic, but it's the same concept.)
Agree in this case the otel type would be a concatenation span.type + span.subtype