Skip to content

Commit

Permalink
docs: Clarify that BeforeSend is not called for transactions (#351)
Browse files Browse the repository at this point in the history
And apply suggestion from a previous change.
  • Loading branch information
rhcarvalho authored May 19, 2021
1 parent daca7e3 commit af57dac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ type ClientOptions struct {
// and if applicable, caught errors type and value.
// If the match is found, then a whole event will be dropped.
IgnoreErrors []string
// Before send callback.
// BeforeSend is called before error events are sent to Sentry.
// Use it to mutate the event or return nil to discard the event.
// See EventProcessor if you need to mutate transactions.
BeforeSend func(event *Event, hint *EventHint) *Event
// Before breadcrumb add callback.
BeforeBreadcrumb func(breadcrumb *Breadcrumb, hint *BreadcrumbHint) *Breadcrumb
Expand Down
4 changes: 2 additions & 2 deletions example/with_extra/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ func main() {
Transport: &devNullTransport{},

// Solution 2 (use custom integration, which will be
// applied to all events, and can be extracted as a
// separate utility and reused across projects):
// applied to all events, can be extracted as a
// separate utility, and reused across projects):
Integrations: func(integrations []sentry.Integration) []sentry.Integration {
return append(integrations, new(ExtractExtra))
},
Expand Down

0 comments on commit af57dac

Please sign in to comment.