opentelemetry-collector-contrib
opentelemetry-collector-contrib copied to clipboard
[exporter/sentryexporter] make status more detailed
Description: Make sentry status more detailed.
We use opentelemetry-javaagent v1.16.0, this collector and Sentry. Javaagent sends only 2 statuses - STATUS_CODE_UNSET (if there is no error) and STATUS_CODE_ERROR. According to current logic in statusFromSpanStatus we always see in Sentry "unknown" statuses for transaction and spans. I suggest using HTTP and Grpc status codes from tags to clarify Sentry status. Grpc and Sentry statuses map one to one. With HTTP statuses it is not so clear. I use https://develop.sentry.dev/sdk/event-payloads/span/, but they suggest multiple HTTP statuses for one Sentry status. It seems that it will be correct to set status Ok (instead of Undefined), if we receive STATUS_CODE_UNSET. Because javaagent uses only STATUS_CODE_UNSET and STATUS_CODE_ERROR. And for database operations there is no http or grpc code. The proof is https://github.com/open-telemetry/opentelemetry-collector/blob/pdata/v0.58.0/pdata/internal/generated_ptrace.go#L1180 ("Semantically, when Status was not set, that means the span ended without errors and to assume Status.Ok (code = 0)")
Link to tracking Issue: n/a
Testing: Tests for spans with http and grpc statuses were added.
Documentation: n/a
I added new enhancement entry in unreleased directory
This PR was marked stale due to lack of activity. It will be closed in 14 days.
Should I make any changes?
cc @AbhiPrasad, who is listed as the codeowner
This PR was marked stale due to lack of activity. It will be closed in 14 days.