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

     1  package errortracking
     2  
     3  import (
     4  	"github.com/getsentry/sentry-go"
     5  )
     6  
     7  // WithField allows to add a custom field to the error.
     8  func WithField(key string, value string) CaptureOption {
     9  	return func(config *captureConfig, event *sentry.Event) {
    10  		event.Tags[key] = value
    11  	}
    12  }