dd-opentracing-cpp icon indicating copy to clipboard operation
dd-opentracing-cpp copied to clipboard

Ignore http status code with value 0.

Open cgilmour opened this issue 6 years ago • 3 comments

Under some circumstances, envoy adds the http.status_code tag with a value that isn't permitted by Datadog. Although invalid values are detected in newer versions of the agent, and corrected by removing that tag from the span, it's better if it doesn't occur at all.

This PR ignores the http.status_code tag if the value is "0".

cgilmour avatar Aug 08 '19 23:08 cgilmour

Assuming we confirm this, should the span be tagged as an error? It might not be a confirmed 5xx, but it's likely something went wrong-enough to report an error flag.

cgilmour avatar Aug 13 '19 04:08 cgilmour

@cgilmour it depends on the meaning of the field. If the fact it is not reported is because of an error (and so Envoy bails out before assigning an HTTP status code) then yes. If it's really generic and it happens also for legit reasons, it should not be considered an error.

palazzem avatar Aug 13 '19 10:08 palazzem

Happy 2021. Is this feature needed?

dgoffredo avatar Sep 02 '21 18:09 dgoffredo