Skip to content
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

Feature Request: Ability to Set Sample Rates via Sentry UI #79437

Open
georg78sf opened this issue Oct 21, 2024 · 1 comment
Open

Feature Request: Ability to Set Sample Rates via Sentry UI #79437

georg78sf opened this issue Oct 21, 2024 · 1 comment

Comments

@georg78sf
Copy link

Problem Statement

Currently, there is no option to configure sample rates for different event types, including replays, directly within the Sentry UI. Instead, these settings for error and performance tracking must be specified in the JavaScript code.

This approach presents challenges, especially when needing to adjust sample rates based on changing traffic volumes or scaling needs. In my opinion, such changes should not require code deployments, as they are more operational than developmental in nature.

Furthermore, depending on how a project is structured, updating Sentry initialization code across multiple HTML pages can add unnecessary complexity, especially for teams working with larger or distributed codebases.

Another issue I’ve encountered is browser compatibility when implementing these settings in code. Despite various attempts, I’ve had difficulty preventing errors such as "duplicate initialization" in certain browsers, which complicates deployment.

Here’s an example of the code I'm using:

Sentry.init({
    integrations: [
      Sentry.replayIntegration(),
    ],
    replaysSessionSampleRate: 0.1, // 10% sampling
    replaysOnErrorSampleRate: 1.0,  // 100% sampling when an error occurs
});

It would be highly beneficial to have the ability to manage these settings dynamically from the Sentry UI, without the need to modify and redeploy code. This would significantly streamline the process, especially for teams managing multiple environments or dealing with fluctuating traffic.

Solution Brainstorm

No response

Product Area

Performance

@getsantry
Copy link
Contributor

getsantry bot commented Oct 21, 2024

Assigning to @getsentry/support for routing ⏲️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Support
Development

No branches or pull requests

1 participant