File: capture_stack_trace.go

package info (click to toggle)
golang-gitlab-gitlab-org-labkit 1.17.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,092 kB
  • sloc: sh: 210; javascript: 49; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 297 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
package errortracking

import (
	"github.com/getsentry/sentry-go"
)

// WithStackTrace allows to extract the stack trace from an error
// and report it to Sentry
func WithStackTrace() CaptureOption {
	return func(config *captureConfig, event *sentry.Event) {
		config.attachStackTrace = true
	}
}