ref(profiles): Apply continuous profiling rate limits to transaction profiles#5614
Open
ref(profiles): Apply continuous profiling rate limits to transaction profiles#5614
Conversation
f48d71d to
6280c8e
Compare
loewenheim
reviewed
Feb 4, 2026
loewenheim
approved these changes
Feb 5, 2026
…profiles
Context:
Transaction profiles have largely been replaced with continuous profiling.
Customers (AM3) are now billed by continuous profiling hours.
Transaction profiles are in the end just considered a profile chunk.
In Relay we have 3 (well 4) data categories:
- PROFILE/ PROFILE_INDEXED - Transaction profiles
- PROFILE_CHUNK - Backend profile chunks
- PROFILE_CHUNK_UI - Frontend/UI profile chunks
To make it easier, there are also PROFILE_CHUNK{,_UI}_HOUR categories,
but we can ignore them for now.
The problem now arises with plans which pay for backend or frontend continuous profiling
and they run out quota for one of the categories. We should also stop accepting
transaction profiles, if their respective backend/frontend data categories is limited.
The Bug:
The getsentry billing backend also added the PROFILE data category into the limit: 0
quota (when customers run out of billing quota), when either backend or ui continuous
profiling was exhausted.
This means, transaction profiles from backend were dropped when the customer
ran out of quota for continuous ui profiling.
A solution:
Now there are many possible solutions, from introducing more data categories to … other things.
They all have a similar problem, they break how our rate limiting is propagated and enforced,
as determining the continuous profiling category requires parsing the platform from the transaction body.
New data categories have the problem they have possibly unintended side effects like outcome
reasons showing up in the wrong data categories. This is also the reason why we can only
modify the rate limiting code, not count transaction profiles to a continuous profiling
category consistently (e.g. when implementing Counted).
The least bad solution seems to be to only change the rate limiting code for transaction profiles
to conditionally also consider the continuous profiling category, if it is available
(e.g. only in "slow path" or if platform is embedded into the item header).
6280c8e to
8a8f4f2
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements: RELAY-199
Does not implement the fast path rate limiting, only "slow" path. This is practically useless since we cannot determine the category correctly in the fast path and would introduce a lot of additional complexity to track the platform separately.