-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
549523e
commit 41166a7
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/platform-includes/configuration/before-send-transaction/ruby.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
```ruby | ||
Sentry.init do |config| | ||
# ... | ||
config.before_send_transaction = lambda do |event, _hint| | ||
# skip unimportant transactions | ||
if event.transaction == "/unimportant/healthcheck/route" | ||
# don't send the event to Sentry | ||
nil | ||
else | ||
# filter out SQL queries from spans with sensitive data | ||
event.spans.each do |span| | ||
span[:description] = '<FILTERED>' if span[:op].start_with?('db') | ||
end | ||
|
||
event | ||
end | ||
end | ||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters