opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

[exporter/sentryexporter] make status more detailed

Open anguisa opened this issue 3 years ago • 5 comments

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

anguisa avatar Aug 18 '22 07:08 anguisa

I added new enhancement entry in unreleased directory

anguisa avatar Aug 19 '22 03:08 anguisa

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Sep 02 '22 05:09 github-actions[bot]

Should I make any changes?

anguisa avatar Sep 02 '22 08:09 anguisa

cc @AbhiPrasad, who is listed as the codeowner

dashpole avatar Sep 02 '22 13:09 dashpole

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Sep 20 '22 05:09 github-actions[bot]