Documentation
¶
Index ¶
- func DefaultBeforeBreadcrumb(breadcrumb *sentry.Breadcrumb, hint *sentry.BreadcrumbHint) *sentry.Breadcrumb
- func DefaultBeforeSend(event *sentry.Event, hint *sentry.EventHint) *sentry.Event
- func LogAndSentryCaptureException(ctx context.Context, err error)
- func LogAndSentryCaptureMessage(ctx context.Context, msg string)
- func PropagateToGRPC(ctx context.Context) context.Context
- func PropagateToHTTP(ctx context.Context, header http.Header) http.Header
- func SentryCaptureException(ctx context.Context, err error)
- func SentryCaptureExceptionWithEcho(c echo.Context, err error)
- func SentryCaptureMessage(ctx context.Context, msg string)
- func SentryCaptureMessageWithEcho(c echo.Context, msg string)
- func StartSpan(c context.Context, operation string, spanOpts ...sentry.SpanOption) (context.Context, func())
- func StartSpanWithEcho(c echo.Context, operation string, spanOpts ...sentry.SpanOption) (context.Context, func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultBeforeBreadcrumb ¶
func DefaultBeforeBreadcrumb(breadcrumb *sentry.Breadcrumb, hint *sentry.BreadcrumbHint) *sentry.Breadcrumb
Modify breadcrumbs through beforeBreadcrumb function.
func DefaultBeforeSend ¶
Modify event through beforeSend function.
func LogAndSentryCaptureException ¶
LogAndSentryCaptureException logs the error and captures an exception with context and send to sentry if sentry is configured. It caputures the exception even if the context or sentry hub in the context is nil.
func LogAndSentryCaptureMessage ¶
LogAndSentryCaptureMessage logs the message and captures a message with context and send to sentry if sentry is configured. It captures the message without context even if the context or sentry hub in the context is nil.
func PropagateToGRPC ¶
PropagateToGRPC propagates the Sentry tracing information to the outgoing gRPC request metadata. Refers to the following link for more information. https://docs.sentry.io/platforms/go/tracing/trace-propagation/custom-instrumentation/#step-2-inject-tracing-information-to-outgoing-requests
func PropagateToHTTP ¶
PropagateToHTTP propagates the Sentry tracing information to the outgoing HTTP/1.X request header. Refers to the following link for more information. https://docs.sentry.io/platforms/go/tracing/trace-propagation/custom-instrumentation/#step-2-inject-tracing-information-to-outgoing-requests
func SentryCaptureException ¶
SentryCaptureException captures an exception with context and send to sentry if sentry is configured. It caputures the exception even if the context or sentry hub in the context is nil. To capture an exception with a stack trace, include the top-level error. For supported libraries, see: https://pkg.go.dev/github.com/getsentry/sentry-go@v0.30.0#ExtractStacktrace
func SentryCaptureExceptionWithEcho ¶
SentryCaptureExceptionWithEcho captures an exception with echo context and send to sentry if sentry is configured. It caputures the exception even if the context or sentry hub in the context is nil. To capture an exception with a stack trace, include the top-level error. For supported libraries, see: https://pkg.go.dev/github.com/getsentry/sentry-go@v0.30.0#ExtractStacktrace
func SentryCaptureMessage ¶
SentryCaptureMessage captures a message with context and send to sentry if sentry is configured. It captures the message even if the context or sentry hub in the context is nil.
func SentryCaptureMessageWithEcho ¶
SentryCaptureMessageWithEcho captures a message with echo context and send to sentry. It captures the message even if the context or sentry hub in the context is nil.
func StartSpan ¶
func StartSpan(c context.Context, operation string, spanOpts ...sentry.SpanOption) (context.Context, func())
StartSpan starts a span and returns context containing the span and a function to finish the corresponding span. Make sure to call the returned function to finish the span.
func StartSpanWithEcho ¶
func StartSpanWithEcho(c echo.Context, operation string, spanOpts ...sentry.SpanOption) (context.Context, func())
StartSpanWithEcho starts a span and returns context containing the span and a function to finish the corresponding span. It also carries over the sentry hub from the echo context to child context. Make sure to call the returned function to finish the span.
Types ¶
This section is empty.