-
-
Notifications
You must be signed in to change notification settings - Fork 191
Set traces_sample_rate
to null
by default
#616
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
Conversation
@stayallive I really like this change, since the default behavior is now not to send trace samples ( which can get pretty expensive quickly.... ) However .. i'm just curious why it wouldn't be enough to just do it like this instead of the explicit type check for null` ? 'traces_sample_rate' => env('SENTRY_TRACES_SAMPLE_RATE') ? (float)env('SENTRY_TRACES_SAMPLE_RATE') : null I'm maybe overseeing something, but by doing it like this - it seems to me like there's a reason for being very explicit ( and also more complex to read ) |
To be clear, there were never any traces sent by default, except when you had a front-end library instructing to send traces which caught some users off guard (understandably). This is why this was changed, but we didn't send traces by default without any input (from the front-end or setting this to > 0). Just to be clear to future readers 😃 Some would argue your example is harder to read, that is code style preference (especially your earlier edit with Edit: Feel free to change the example provided with whatever works and reads best for you of course 👌 |
So my comment became a bit of a mess because you changed your example (I answered based on the GitHub notification e-mail) sorry about that :) Your current example doesn't allow setting the |
I get your point. Thanks for taking your time to elaborate. It actually makes sense, that if you set it to In my way - when you set it to Alright. Thank you. And yes -- sorry for the confusion about the default behavior! 😄 |
It's not incorrect but also not something we can fix since the Laravel |
sentry/sentry
to version including: fix: Settraces_sample_rate
tonull
by default sentry-php#1428(missing
sentry/sentry
release is failing the tests)