Skip to content

Commit

Permalink
Lower Sentry sampling rate to 25% (#2200)
Browse files Browse the repository at this point in the history
Lower Sentry sampling rate

Report only 25% of errors
  • Loading branch information
lithrel authored and comzeradd committed Jan 23, 2024
1 parent 80efd9e commit 1162f3c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,3 +497,11 @@ function ($canonical_url, $post) {
10,
2
);

if (class_exists('\\Sentry\\Options')) {
add_filter('wp_sentry_options', function (\Sentry\Options $options) {
// Only sample 25% of the events
$options->setSampleRate(0.25);
return $options;
});
}

0 comments on commit 1162f3c

Please sign in to comment.