libsentry

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHubFromContext

func GetHubFromContext(ctx context.Context) *sentry.Hub

GetHubFromContext retrieves attached *sentry.Hub instance from context.

func InitSentry

func InitSentry(c *conf.Sentry) error

func Server

func Server(opts ...Option) middleware.Middleware

Server returns a new server middleware for Sentry.

Types

type Option

type Option func(*Options)

func WithRepanic

func WithRepanic(repanic bool) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

func WithWaitForDelivery

func WithWaitForDelivery(waitForDelivery bool) Option

type Options

type Options struct {
	// Repanic configures whether Sentry should repanic after recovery, in most cases it should be set to true.
	Repanic bool
	// WaitForDelivery configures whether you want to block the request before moving forward with the response.
	WaitForDelivery bool
	// Timeout for the event delivery requests.
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL