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

feat(general): Add SpanStatus to span struct #603

Merged
merged 2 commits into from
Jun 4, 2020

Conversation

AbhiPrasad
Copy link
Member

Motivation

According to our dev docs at https://develop.sentry.dev/sdk/event-payloads/span/, status should be an explicit field on the span struct. The JS SDK is already setting it, and it is rendered for individual spans in the UI.

Implementation

Update the Span struct to have a field status. This is typed using SpanStatus, the same as the status on an event. Also updated the tests in the file.

@AbhiPrasad AbhiPrasad requested a review from a team June 3, 2020 17:49
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

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

We could consider to move the span status into span.rs then, since it sounds like it belongs more there than in contexts.

Deferring to @untitaker for final review, he's the chief of spans.

@jan-auer jan-auer requested a review from untitaker June 3, 2020 18:03
Copy link
Member

@untitaker untitaker left a comment

Choose a reason for hiding this comment

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

trace context and span status needs to be deduplicated, we just don't have serde(flatten) implemented to pull that off.

Since there are so many fields shared between trace context and the span struct I feel like it doesn't matter where the auxilliary types live

@untitaker untitaker merged commit bf460e6 into master Jun 4, 2020
@untitaker untitaker deleted the abhi/feat/span-status branch June 4, 2020 11:49
RaduW pushed a commit that referenced this pull request Jun 4, 2020
According to our dev docs at https://develop.sentry.dev/sdk/event-payloads/span/, status should be an explicit field on the span struct. The JS SDK is already setting it, and it is rendered for individual spans in the UI.

Update the Span struct to have a field status. This is typed using SpanStatus, the same as the status on an event. Also updated the tests in the file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants