-
Notifications
You must be signed in to change notification settings - Fork 93
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
Rate Limit indexed payloads only once #3662
Comments
This was referenced Jun 6, 2024
Dav1dde
added a commit
that referenced
this issue
Jun 18, 2024
…/indexed items (#3716) Partially Implements: #3662 (does not move rate limits to after aggregation). Changes: - Data in an envelope is always considered to be both Indexed and Non-Indexed, for example: Until a transaction is removed from an envelope it is considered to be both `Transaction` and `TransactionIndexed`. Only dynamic sampling, when dropping the transaction from the envelope, emits one outcome with the `TransactionIndexed` category. - A few tests asserted the old/wrong behaviour of only emitting a single outcome, e.g. when an inbound filter filters a transaction we used to only get a `Transaction` outcome but not a `TransactionIndexed`, these tests have been aligned. - When checking rate limits for an envelope, quota on the 'base' category (e.g. `Transaction`) is now consumed. - Metrics now remember whether they were extracted from a sampled envelope item. - Metrics are immediately rate limited using the same rate limits as the ones used for the envelope. - Metrics from sampled envelopes will not be rate limited again. - Improved cached rate limits with a new type struct, which surfaced a bug that they weren't always correctly expired (fixed). Future Improvements: - Move metrics rate limiting to after aggregation - Stream line metrics rate limiting from 4 (cached transactions/spans, transactions/spans, cached metric_buckets, metric_bucket) different checks to 2 (cached, non-cached)
Dav1dde
added a commit
that referenced
this issue
Jun 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently indexed payloads get rate limited twice for their non-indexed data category:
We can simplify this to:
This does require us to remember whether a metric was already rate limited through the indexed payload.
The upside here is, we save on individual Redis calls and it allows us to rate limit metrics (non-indexed) after aggregation reducing the total amount of rate limit checks (Redis calls) thanks to aggregation.
The new 'design':
The text was updated successfully, but these errors were encountered: