Skip to content

Data retention docs: attachment TTL may be inaccurate (docs say 90d, code says 30d) #17175

@sentry-junior

Description

@sentry-junior

Summary

The data retention docs state that attachments are retained for 90 days on Team/Business/Enterprise plans. However, the object store TTL for attachments in sentry is hardcoded to 30 days, regardless of plan tier.

Root cause

src/sentry/objectstore/__init__.py defines the attachments usecase with a fixed TTL:

_ATTACHMENTS_USECASE = Usecase("attachments", expiration_policy=TimeToLive(timedelta(days=30)))

Unlike event retention (get_event_retention is plan-aware), the attachment usecase TTL does not hook into plan-based retention logic. This means all attachments expire at the infrastructure level after 30 days, regardless of plan.

Expected behavior

Docs should accurately reflect the enforced TTL. Either:

  • Update the docs to say 30 days for all plans, or
  • Update the code to respect plan-based retention for attachments if 90 days is the intended behavior for higher tiers

Versions affected

Confirmed against current getsentry/sentry main branch (src/sentry/objectstore/__init__.py).

Action taken on behalf of Neil Manvar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions