You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, I have searched for similar requests on GitHub and found none.
What type of feature?
Integration
What is the motivation for the request?
This feature request aims to make the sample rates (tracesSampleRate and profilesSampleRate) for Sentry configurable through environment variables. This allows users to adjust the sample rates depending on their environment (e.g., development, production) without changing the code.
Currently, the sample rates are set to fixed values (1.0), which limits the flexibility to adjust these values per environment. Allowing them to be configured through environment variables would give developers better control over the Sentry configuration based on their deployment settings.
Usage Examples
In development, you might want a higher sample rate (e.g., 1.0), while in production, a lower sample rate (e.g., 0.1) may be appropriate.
How should the feature be developed?
Add new environment variables SENTRY_TRACES_SAMPLE_RATE and SENTRY_PROFILES_SAMPLE_RATE in the .env file.
Use parseFloat() to retrieve these values and set default values in case they are not defined.
Update the Sentry initialization to use these environment variables for sample rates.
By implementing this feature, developers can easily manage Sentry configuration based on the environment, offering better flexibility and control over performance monitoring.
The text was updated successfully, but these errors were encountered:
Welcome!
What type of feature?
Integration
What is the motivation for the request?
This feature request aims to make the sample rates (tracesSampleRate and profilesSampleRate) for Sentry configurable through environment variables. This allows users to adjust the sample rates depending on their environment (e.g., development, production) without changing the code.
Currently, the sample rates are set to fixed values (1.0), which limits the flexibility to adjust these values per environment. Allowing them to be configured through environment variables would give developers better control over the Sentry configuration based on their deployment settings.
Usage Examples
In development, you might want a higher sample rate (e.g., 1.0), while in production, a lower sample rate (e.g., 0.1) may be appropriate.
How should the feature be developed?
SENTRY_TRACES_SAMPLE_RATE
andSENTRY_PROFILES_SAMPLE_RATE
in the .env file.Example code:
Additional Notes
By implementing this feature, developers can easily manage Sentry configuration based on the environment, offering better flexibility and control over performance monitoring.
The text was updated successfully, but these errors were encountered: