Skip to content

Comments

fix(profiles): Use separate data categories for transaction backend/ui profiles #5648

Open
Dav1dde wants to merge 11 commits intomasterfrom
dav1d/rate-limit-profile-stuff-for-real-final
Open

fix(profiles): Use separate data categories for transaction backend/ui profiles #5648
Dav1dde wants to merge 11 commits intomasterfrom
dav1d/rate-limit-profile-stuff-for-real-final

Conversation

@Dav1dde
Copy link
Member

@Dav1dde Dav1dde commented Feb 19, 2026

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:

  • PROFILE
  • PROFILE_INDEXED
  • PROFILE_BACKEND or PROFILE_UI

…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.
@Dav1dde Dav1dde requested a review from a team as a code owner February 19, 2026 14:39
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@Zylphrex Zylphrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, we'll need to follow up in getsentry to send the appropriate rate limits after this.

@Dav1dde Dav1dde force-pushed the dav1d/rate-limit-profile-stuff-for-real-final branch from 8cbf1d5 to deaadab Compare February 19, 2026 16:36
@Dav1dde Dav1dde self-assigned this Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants