-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(eap): add downsampled event retention to config #96818
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
Changes from all commits
c29d05d
e2be7ee
688b7d4
e91d54b
fc37c5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -401,6 +401,13 @@ def get_event_retention(self, organization): | |
""" | ||
return _limit_from_settings(options.get("system.event-retention-days")) | ||
|
||
def get_downsampled_event_retention(self, organization): | ||
""" | ||
Returns the retention for downsampled events in the given organization in days. | ||
Returning ``0`` means downsampled event retention will default to the value of ``get_event_retention``. | ||
""" | ||
return 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose this will read a value linked to the plan at some point? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
def validate(self): | ||
""" | ||
Validates that the quota service is operational. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
created: '2025-08-06T00:04:51.292281+00:00' | ||
created: '2025-08-11T23:31:41.914727+00:00' | ||
creator: sentry | ||
source: tests/sentry/relay/test_config.py | ||
--- | ||
|
@@ -20,6 +20,7 @@ config: | |
scrubData: true | ||
scrubDefaults: true | ||
sensitiveFields: [] | ||
downsampledEventRetention: 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That seems bad, if we were to store 0? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
filterSettings: | ||
csp: | ||
disallowedSources: | ||
|
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.
Comment says it returns
None
, this is actually0
.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.
Ok I updated the docstring here fc37c5d
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.
Would there ever be a need to set retention to 0?
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.
No, we wouldn't. If you want a better default here, we can return
get_event_retention()