Skip to content

fix(objectstore): Propagate attachment retention#5774

Merged
tobias-wilfert merged 3 commits intomasterfrom
matth/objectstore-propagate-retention
Mar 31, 2026
Merged

fix(objectstore): Propagate attachment retention#5774
tobias-wilfert merged 3 commits intomasterfrom
matth/objectstore-propagate-retention

Conversation

@matt-codecov
Copy link
Copy Markdown
Contributor

@matt-codecov matt-codecov commented Mar 27, 2026

objectstore clients in Relay and Sentry are hardcoded to use 30d TTL retention for all attachments. we need to instead inherit the correct retention policy from the event/envelope/project/whatever.

questions:

  • are ctx.event_retention().standard and envelope.envelope().retention() the correct places to inherit the retention policy from?
  • what are trace attachments? usage of the type is not clear to me

Ref INGEST-837

@matt-codecov matt-codecov requested a review from a team as a code owner March 27, 2026 20:40
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

.event_attachments
.for_project(scoping.organization_id.value(), scoping.project_id.value())
.session(&self.objectstore_client);
let retention = envelope.envelope().retention();
Copy link
Copy Markdown
Member

@jan-auer jan-auer Mar 30, 2026

Choose a reason for hiding this comment

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

Flagging this to double-check: Attachments never used standard event retention. IIRC, they are by default stored for 30 days even if event retention is set to 90. I don't recall there were ever any plan overrides.

If we make this change, we should check if event attachments by definition have the same retention as events or whether we need to expose a separate config to Relay.

@linear-code
Copy link
Copy Markdown

linear-code bot commented Mar 30, 2026

@matt-codecov matt-codecov force-pushed the matth/objectstore-propagate-retention branch from c3365a9 to acee0b3 Compare March 30, 2026 22:34
@matt-codecov matt-codecov force-pushed the matth/objectstore-propagate-retention branch from acee0b3 to 5028241 Compare March 30, 2026 23:42
@matt-codecov matt-codecov changed the title fix(objectstore): propagate attachment retention fix(objectstore): Propagate attachment retention Mar 31, 2026
@tobias-wilfert
Copy link
Copy Markdown
Member

what are trace attachments? usage of the type is not clear to me

It is a form of attachments that we build a while back: https://develop.sentry.dev/sdk/telemetry/attachments/#trace-attachments

@tobias-wilfert tobias-wilfert added this pull request to the merge queue Mar 31, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 31, 2026
@tobias-wilfert tobias-wilfert added this pull request to the merge queue Mar 31, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 31, 2026
@tobias-wilfert tobias-wilfert added this pull request to the merge queue Mar 31, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 31, 2026
@tobias-wilfert tobias-wilfert added this pull request to the merge queue Mar 31, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 31, 2026
@tobias-wilfert tobias-wilfert added this pull request to the merge queue Mar 31, 2026
Merged via the queue into master with commit 2b77d4b Mar 31, 2026
30 checks passed
@tobias-wilfert tobias-wilfert deleted the matth/objectstore-propagate-retention branch March 31, 2026 13:17
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.

3 participants