Skip to content

Commit 77029df

Browse files
stayallivecleptric
andauthored
Set traces_sample_rate to null by default (#616)
Co-authored-by: Michael Hoffmann <[email protected]>
1 parent b0a6076 commit 77029df

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Set `traces_sample_rate` to `null` by default (#616)
56
- Fix exceptions sent via the `report()` helper being marked as unhandled (#617)
67

78
## 3.1.1

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"require": {
2424
"php": "^7.2 | ^8.0",
2525
"illuminate/support": "^6.0 | ^7.0 | ^8.0 | ^9.0",
26-
"sentry/sentry": "^3.11",
26+
"sentry/sentry": "^3.12",
2727
"sentry/sdk": "^3.3",
2828
"symfony/psr-http-message-bridge": "^1.0 | ^2.0",
2929
"nyholm/psr7": "^1.0"

config/sentry.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
'missing_routes' => false,
5252
],
5353

54-
// @see: https://docs.sentry.io/platforms/php/configuration/options/#send-default-pii
54+
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#send-default-pii
5555
'send_default_pii' => env('SENTRY_SEND_DEFAULT_PII', false),
5656

57-
'traces_sample_rate' => (float)(env('SENTRY_TRACES_SAMPLE_RATE', 0.0)),
57+
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#traces-sample-rate
58+
'traces_sample_rate' => env('SENTRY_TRACES_SAMPLE_RATE') === null ? null : (float)env('SENTRY_TRACES_SAMPLE_RATE'),
5859

5960
];

0 commit comments

Comments
 (0)