gitlab.com/gitlab-org/labkit@v1.21.0/errortracking/capture_stack_trace.go (about)

     1  package errortracking
     2  
     3  import (
     4  	"github.com/getsentry/sentry-go"
     5  )
     6  
     7  // WithStackTrace allows to extract the stack trace from an error
     8  // and report it to Sentry
     9  func WithStackTrace() CaptureOption {
    10  	return func(config *captureConfig, event *sentry.Event) {
    11  		config.attachStackTrace = true
    12  	}
    13  }