getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.16k stars 4.2k forks source link

Delete and discard future events doesn't delete attachments #80543

Open rasthoph opened 2 weeks ago

rasthoph commented 2 weeks ago

Self-Hosted Version

24.10.0

CPU Architecture

x86_64

Docker Version

25.0.5

Docker Compose Version

2.29.2

Steps to Reproduce

  1. Open Issue with events and attachments
  2. Click "delete and discard future events"
  3. Sentry storage usage doesn't change
  4. Run sentry cleanup manually
  5. Sentry storage usage doesn't change
  6. After 24 hours the storage usage seems to decrease magically

Expected Result

Immediate deletion of the attachments of a deleted issue or at least immediately after running the sentry cleanup command.

Actual Result

We had the situation where a massive amount of crashes with huge attachments arrived and filled our storage. So we decided to delete the issue and discard future events. After that the issue disappeared from the UI, but the storage didn't change at all. After running the sentry cleanup command manually, nothing happened again. But surprisingly after 24 hours the storage usage seems to decrease slowly over a time period of a few hours.

How does the deletion of the event attachments of a deleted issue work? Is there any other process than sentry cleanup running in the background?

Or maybe does Sentry offer a tool or option to delete the attachments? I couldn't find something in the documentation.

Thank you 🙏

Event ID

No response

bc-sentry commented 2 days ago

Transferring to sentry for product area review

getsantry[bot] commented 2 days ago

Routing to @getsentry/product-owners-issues for triage ⏲️

getsantry[bot] commented 2 days ago

Auto-routing to @getsentry/product-owners-issues for triage ⏲️

mrduncan commented 2 days ago

These should be the docs you're looking for:

Attachments persist for 30 days; if your total storage included in your quota is exceeded, attachments will not be stored. You can delete attachments or their containing events at any time. Deleting an attachment does not affect your quota - Sentry counts an attachment toward your quota as soon as it is stored.

https://docs.sentry.io/platforms/go/enriching-events/attachments/

rasthoph commented 2 days ago

Thank you, but i am not sure how this can help us, because we are using a self-hosted sentry and therefore have no quota.

I was specifically asking for a solution or answer of the self-hosted sentry.

How does the deletion of the event attachments of a deleted issue work? Is there any other process than sentry cleanup running in the background?

Or maybe does Sentry offer a tool or option to delete the attachments?
jangjodi commented 1 day ago

When Sentry deletes issues, the issue is marked for deletion, but the issue's events and its attachments are deleted in bulk asynchronously in a task GroupDeletionTask. This is why the attachments aren't removed for 24 hours.

I'm not sure if there's another process that can be run to do this immediately for self-hosted, so I will leave that for the self-hosted team to answer.