-
Notifications
You must be signed in to change notification settings - Fork 103
Send attachment
data inline when possible
#3654
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
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.
Looks good to me, could you please add an integration test for the new behavior? See test_attachments_with_processing
as an example.
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.
Two integration tests are still failing, could be that they are just flaky though.
This will be used in relay starting with this PR: getsentry/relay#3654
For `invidual_attachments`, we can now send the `data` inline if it is small enough. This avoids having to store temporary `attachment_chunks` in the processing redis store.
2615cb9
to
9991ff0
Compare
Thanks for all the feedback! I rebased/squashed the PR, added documentation to the function, and cleaned up the flow in the caller. |
For
invidual_attachments
, we can now send thedata
inline if it is small enough. This avoids having to store temporaryattachment_chunks
in the processing redis store.Right now, every "event" attachment is sent with outlined chunks, even for things like logfiles, even though only minidumps and other processing-relevant attachments need to be treated that way.
It might be possible to also inline logfiles with more logic. That way, such attachments could be saved as
EventAttachment
directly without putting load on the attachments store. Doing that however would create problems when such events are discarded within the rest of the pipeline.Support for consuming the
data
property is being added in getsentry/sentry#71522 to the Sentry codebase.Developing this, I noticed that
extract_kafka_messages_for_event
is a free function returning anIterator
purely for testing purposes. These tests pretty much just tested thesend_individual_attachments
logic in a very convoluted way, and are now pretty useless.