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: Add support of tracing::Span::record operation for sentry-tracing #364

Merged
merged 4 commits into from
Sep 30, 2021

Conversation

zryambus
Copy link
Contributor

Before this PR this code had no effect:

tracing::Span::current().record("field", &"data");

@Swatinem
Copy link
Member

Can you run this through rustfmt real quick? That seems to be the only failure.

@zryambus
Copy link
Contributor Author

Can you run this through rustfmt real quick? That seems to be the only failure.

Done


assert_eq!(envelopes.len(), 1);

let envelope_item = envelopes[0].items().next().unwrap();
let ref transaction = match envelope_item {
sentry::protocol::EnvelopeItem::Transaction(t) => t,
_ => { assert!(false); return; }
_ => {
assert!(false);
Copy link
Member

Choose a reason for hiding this comment

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

Since this is test code, you can as well panic!("expected only a transaction item");
As the panic diverges, you also don’t need the return/block afterwards.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I'll know

@Swatinem Swatinem merged commit 669dbd7 into getsentry:master Sep 30, 2021
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.

None yet

2 participants