errortracking/capture_field.go (9 lines of code) (raw):

package errortracking import ( "github.com/getsentry/sentry-go" ) // WithField allows to add a custom field to the error. func WithField(key string, value string) CaptureOption { return func(config *captureConfig, event *sentry.Event) { event.Tags[key] = value } }