-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Fix mentions to 'all events' (#350)
When the examples and accompanying documentation were written, 'all events' meant 'error events'. With transactions added to the SDK, BeforeSend is only applied to error events while all EventProcessor functions (on client, scope or global) are applied to all outgoing events (errors and transactions).
- Loading branch information
1 parent
20c242c
commit daca7e3
Showing
2 changed files
with
5 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ func main() { | |
Dsn: "https://[email protected]/1337", | ||
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event { | ||
// Solution 1 (use beforeSend, which will be applied to | ||
// all events and is usually application specific): | ||
// error events and is usually application specific): | ||
if ex, ok := hint.OriginalException.(CustomComplexError); ok { | ||
for key, val := range ex.GimmeMoreData() { | ||
event.Extra[key] = val | ||
|
@@ -80,9 +80,9 @@ func main() { | |
}, | ||
Transport: &devNullTransport{}, | ||
|
||
// Solution 2 (use custom integration, which will also be | ||
// applied to all events, but can be easily extracted even as a | ||
// separate utility and reused across all your projects): | ||
// Solution 2 (use custom integration, which will be | ||
// applied to all events, and can be extracted as a | ||
// separate utility and reused across projects): | ||
Integrations: func(integrations []sentry.Integration) []sentry.Integration { | ||
return append(integrations, new(ExtractExtra)) | ||
}, | ||
|