-
-
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.
feat(core): Add
beforeSendSpan
documentation for javascript (#10055)
- Loading branch information
1 parent
6b98048
commit 1214193
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
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
17 changes: 17 additions & 0 deletions
17
platform-includes/configuration/before-send-span/javascript.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,17 @@ | ||
<SignInNote /> | ||
|
||
```javascript | ||
Sentry.init({ | ||
dsn: "___PUBLIC_DSN___", | ||
|
||
// Called for spans | ||
beforeSendSpan(span) { | ||
// Modify or drop the span here | ||
if (span.description === 'unimportant span') { | ||
// Don't send the span to Sentry | ||
return null; | ||
} | ||
return span; | ||
}, | ||
}); | ||
``` |