forked from open-telemetry/opentelemetry-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(datadog): status_code must be 0 or 1 (open-telemetry#580) (open-t…
…elemetry#581) opentelemetry's StatusCode enum can be 0 (Unset), 1 (Ok) or 2 (Error). otel specification says "don't ever use Ok, just leave it unset". So for, non-error spans, the opentelemetry-datadog exporter does the right thing: it sets the datadog trace's status code to 0. However, for errors, the opentelemetry-datadog exporter sets the status_code to 2. This isn't explicitly discouraged by the available Datadog docs, but it causes something really interesting: the trace shows up with a "red" left border in Datadog APM (instead of a "green" one). The "Ok/Error" filter filters those traces correctly. However, half the UI is missing: when opening the trace, there's no '!' in the left-hand corner, there's no "Errors (1)" tab, and there's no detail of the error being shown in a user-friendly way. tl;dr In the Datadog backend, there's some code that does "status_code != 0", and some code that does "status_code == 1". The 2 value isn't set by their Go exporter, and so the opentelemetry-rust exporter should never use it. Co-authored-by: Amos Wenger <fasterthanlime@users.noreply.github.com>
- Loading branch information
1 parent
381be08
commit 1e47903
Showing
3 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters