feat(dyn-sampling): Adds get_blended_sample_rate to Quota abstraction#39967
Merged
Conversation
39168d2 to
07e75a9
Compare
07e75a9 to
0de511e
Compare
…tion Adds `get_blended_sample_rate` method to the `Quota` abstraction to support functionality on both sentry/getsentry to create and thereby send uniform sampling rules as part of the ProjectConfig sent to Relay
0de511e to
3e7b109
Compare
ahmedetefy
pushed a commit
that referenced
this pull request
Oct 17, 2022
This PR is follow up for issues: ``` E AttributeError: module 'sentry.quotas' has no attribute 'get_blended_sample_rate' ``` related to #39967 Co-authored-by: Andrii Soldatenko <andrii.soldatenko@gmail.io>
barkbarkimashark
pushed a commit
that referenced
this pull request
Oct 18, 2022
…tion (#39967) Adds `get_blended_sample_rate` method to the `Quota` abstraction to support functionality on both sentry/getsentry to create and thereby send uniform sampling rules as part of the ProjectConfig sent to Relay. This method will be called: - When UI requests project details endpoint, we return all DS rules including the uniform rule as part of the response. And so we inject the uniform sampling rule with the `blended_sample_rate` into the response. - When computing `ProjectConfig` as in `sentry/relay/config/init.py::_get_project_config`. This is called when the `schedule_invalidate_project_config` task is invoked. Thereby we would expect the project config cache to be invalidated when: - Beginning of the billing cycle due to plan downgrades/upgrades or crossing from on demand back to prepaid - Crossing over from prepaid to on demand budget - Is there other scenarios where we should invalidate cache in?
barkbarkimashark
pushed a commit
that referenced
this pull request
Oct 18, 2022
This PR is follow up for issues: ``` E AttributeError: module 'sentry.quotas' has no attribute 'get_blended_sample_rate' ``` related to #39967 Co-authored-by: Andrii Soldatenko <andrii.soldatenko@gmail.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
get_blended_sample_ratemethod to theQuotaabstraction to support functionality on both sentry/getsentry to create and thereby send uniform sampling rules as part of the ProjectConfig sent to Relay.This method will be called:
blended_sample_rateinto the response.ProjectConfigas insentry/relay/config/init.py::_get_project_config. This is called when theschedule_invalidate_project_configtask is invoked.Thereby we would expect the project config cache to be invalidated when: