dd-opentracing-cpp
dd-opentracing-cpp copied to clipboard
Ignore http status code with value 0.
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".
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 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.
Happy 2021. Is this feature needed?