fix(profiles): Use separate data categories for transaction backend/ui profiles #5648
Open
fix(profiles): Use separate data categories for transaction backend/ui profiles #5648
Conversation
…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).
Instead of using the continuous profiling categories, this introduces two new separate data categories to give getsentry more individual control over profiles. This makes it possible to rate limit transaction profiles separately from continuous profiling.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Zylphrex
approved these changes
Feb 19, 2026
Member
Zylphrex
left a comment
There was a problem hiding this comment.
Looks good to me, we'll need to follow up in getsentry to send the appropriate rate limits after this.
8cbf1d5 to
deaadab
Compare
loewenheim
reviewed
Feb 20, 2026
jjbayer
approved these changes
Feb 20, 2026
loewenheim
approved these changes
Feb 20, 2026
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.
Introduces two new data categories for transaction profiles, backend and ui. This allows Sentry to separately rate limit, transaction profiles (all), backend transaction profiles and ui transaction profiles.
A transaction profile is now rate limited in all of these categories:
PROFILEPROFILE_INDEXEDPROFILE_BACKENDorPROFILE_UI