Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fix mentions to 'all events' #350

Merged
merged 1 commit into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/recover-repanic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func RecoverRepanic(f func()) {
// Add an EventProcessor to the scope. The event processor is a function
// that can change events before they are sent to Sentry.
// Alternatively, see also ClientOptions.BeforeSend, which is a special
// event processor applied to all events.
// event processor applied to error events.
hub.ConfigureScope(func(scope *sentry.Scope) {
scope.AddEventProcessor(func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
filterFrames(event)
Expand Down
8 changes: 4 additions & 4 deletions example/with_extra/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {
Dsn: "https://hello@world.io/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
Expand All @@ -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):
Comment on lines +83 to +85
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Think this flows better

Suggested change
// Solution 2 (use custom integration, which will be
// applied to all events, and can be extracted as a
// separate utility and reused across projects):
// Solution 2 (use custom integration, which will be
// 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