open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.71k stars 887 forks source link

Should span Status description be of low cardinality? #3687

Open jcarres-mdsol opened 1 year ago

jcarres-mdsol commented 1 year ago

Currently the spec about span status mentions that the Description SHOULD be documented and predictable. and Description that provides a descriptive message of the Status.

We are using a library which adds to the description something like "failed to connect to queue 'uuid'" where 'uuid' is the whole uuid. This creates many unique descriptions which would prevent us from using description as a metric label, something that is on the other hand desirable in http spans.

Should the spec add a note description SHOULD be of low cardinality or description cardinality should follow the guidance for span names ?

Oberon00 commented 1 year ago

You mention the span name, but you mean the description inside the span status, right?

jcarres-mdsol commented 1 year ago

Yes sorry, I've fixed the first link, it is all about the description of the span status

trask commented 1 year ago

there's been a bit of prior discussion on this, see #3496

I have the feeling that we may need to relax the restriction on span status description based on feedback from @Oberon00 and @jsuereth

prevent us from using description as a metric label

check out the brand new error.type attribute which is approximately the metric equivalent of span status description

jmacd commented 9 months ago

@trask I agree we should relax the restriction on span status -- and that some other well-specified attribute value should be used when metrics are requested.

svrnm commented 4 months ago

is this still being discussed?

trask commented 4 months ago

I think a PR would be useful to clarify that span status description does not need to be low cardinality, since this has been unclear previously.