-
Notifications
You must be signed in to change notification settings - Fork 106
fix(attachments): Serialize ID without hyphens #5501
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
Conversation
| } | ||
|
|
||
| #[derive(Clone, Default, PartialEq, Empty, FromValue, ProcessValue)] | ||
| pub struct AttachmentId(Uuid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was largely copied from TraceId.
| return { | ||
| "trace_id": uuid.uuid4().hex, | ||
| "attachment_id": str(uuid.uuid4()), | ||
| "attachment_id": uuid.uuid4().hex, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The input doesn't need to be hyphen-free, but it makes comparisons with the output easier.
| pytest.param( | ||
| {"meta_length": None}, | ||
| 273, | ||
| 269, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more hyphens -> saved some chars.
| def create_attachment_envelope(project_config): | ||
| return Envelope( | ||
| headers={ | ||
| "event_id": "515539018c9b4260a6f999572f1661ee", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive-by fix: trace attachment envelopes should not have an event ID.
Serialize attachment IDs without hyphens. This is the Sentry way, and aligns better with Event IDs and Trace IDs.
This also means that objectstore keys are now hyphen-free, which would be a breaking change if this wasn't an experimental feature.