Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/sentryexporter] make status more detailed #13407

Merged
merged 4 commits into from
Sep 26, 2022

Conversation

anguisa
Copy link
Contributor

@anguisa anguisa commented Aug 18, 2022

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 anguisa requested review from a team and dashpole August 18, 2022 07:56
@dashpole dashpole added exporter/sentry enhancement New feature or request labels Aug 18, 2022
@anguisa
Copy link
Contributor Author

anguisa commented Aug 19, 2022

I added new enhancement entry in unreleased directory

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2022

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

@github-actions github-actions bot added the Stale label Sep 2, 2022
@anguisa
Copy link
Contributor Author

anguisa commented Sep 2, 2022

Should I make any changes?

@dashpole
Copy link
Contributor

dashpole commented Sep 2, 2022

cc @AbhiPrasad, who is listed as the codeowner

@github-actions github-actions bot removed the Stale label Sep 3, 2022
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added the Stale label Sep 20, 2022
@mx-psi mx-psi merged commit 36b3f5b into open-telemetry:main Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants