Skip to content

Commit

Permalink
Send attachment data inline when possible (#3654)
Browse files Browse the repository at this point in the history
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.

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.
  • Loading branch information
Swatinem committed May 31, 2024
1 parent 7d41c47 commit 703a2e1
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 279 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- Forward `received_at` timestamp for buckets sent to Kafka. ([#3561](https://github.com/getsentry/relay/pull/3561))
- Limit metric name to 150 characters. ([#3628](https://github.com/getsentry/relay/pull/3628))
- Add validation of Kafka topics on startup. ([#3543](https://github.com/getsentry/relay/pull/3543))
- Send `attachment` data inline when possible. ([#3654](https://github.com/getsentry/relay/pull/3654))

## 24.5.0

Expand Down
11 changes: 11 additions & 0 deletions relay-dynamic-config/src/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,17 @@ pub struct Options {
)]
pub feedback_ingest_topic_rollout_rate: f32,

/// Rollout rate for sending attachment chunks inline.
///
/// Rate needs to be between `0.0` and `1.0`.
/// If set to `1.0` all eligible attachment chunks will be sent as part of the attachment message.
#[serde(
rename = "relay.inline-attachments.rollout-rate",
deserialize_with = "default_on_error",
skip_serializing_if = "is_default"
)]
pub inline_attachments_rollout_rate: f32,

/// Overall sampling of span extraction.
///
/// This number represents the fraction of transactions for which
Expand Down
Loading

0 comments on commit 703a2e1

Please sign in to comment.