Skip to content

Conversation

@dmitrymur
Copy link
Contributor

This pull request adds a SpanStatus enumeration to the protocol according to the documentation Span Interface
It also changes status field type from Option<String> to Option<SpanStatus> for Span and Transaction.

@dmitrymur dmitrymur closed this Jul 12, 2021
@dmitrymur dmitrymur reopened this Jul 12, 2021

/// The status of a Span.
#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum SpanStatus {
Copy link
Member

Choose a reason for hiding this comment

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

please make this #[non_exhaustive]

}

impl str::FromStr for SpanStatus {
type Err = ParseLevelError;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe a more descriptive error would be a good idea. I have to look at more examples, I’m not sure what kind of errors we use for all the other enums here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am sorry, going to add ParseStatusError struct and use it here.

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