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

fix(spans): Mark all fields untrimmable #3890

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Aug 2, 2024

Mark all fields of a span as untrimmable to ensure that the span is either trimmed as a whole, or left intact.

This PR is a temporary fix until we have a better way to atomically trim / not trim PRs.

Note that when we trim a span from a transaction, no outcome is generated for the span.

Fixes #3880.

Comment on lines +966 to +967
// The actual spans were not touched:
assert_eq!(trimmed_spans.as_slice(), &spans[0..8]);
Copy link
Member Author

Choose a reason for hiding this comment

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

This assertion fails without the changes to Span.

Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@jjbayer jjbayer marked this pull request as ready for review August 2, 2024 09:39
@jjbayer jjbayer requested a review from a team as a code owner August 2, 2024 09:39
Comment on lines +966 to +967
// The actual spans were not touched:
assert_eq!(trimmed_spans.as_slice(), &spans[0..8]);
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

Base automatically changed from revert-3877-riccardo/fix/trimming-spans to master August 2, 2024 09:49
@jjbayer jjbayer enabled auto-merge (squash) August 2, 2024 10:23
@jjbayer jjbayer merged commit 871ba75 into master Aug 2, 2024
24 checks passed
@jjbayer jjbayer deleted the fix/span-all-fields-safe branch August 2, 2024 11:39
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.

2 participants