sentryjin

package module
v0.0.0-...-e3cc4be Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHubFromContext

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

GetHubFromContext retrieves attached *sentry.Hub instance from gin.Context.

func New

func New(options Options) jin.HandlerFunc

New returns a function that satisfies gin.HandlerFunc interface It can be used with Use() methods.

Types

type Options

type Options struct {
	// Repanic configures whether Sentry should repanic after recovery, in most cases it should be set to true,
	// as gin.Default includes it's own Recovery middleware what handles http responses.
	Repanic bool
	// WaitForDelivery configures whether you want to block the request before moving forward with the response.
	// Because Gin's default Recovery handler doesn't restart the application,
	// it's safe to either skip this option or set it to false.
	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