sentry

package
v0.0.0-...-7abf5e3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package sentry is a middleware package for sentry integration

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Skipper:        middleware.DefaultSkipper,
	AreHeadersDump: true,
	IsBodyDump:     true,
}

DefaultConfig is the default Sentry middleware config

Functions

func New

func New() echo.MiddlewareFunc

New returns a new Sentry middleware

func NewWithConfig

func NewWithConfig(config Config) echo.MiddlewareFunc

NewWithConfig returns a new Sentry middleware with config

Types

type Config

type Config struct {
	// Skipper defines a function to skip middleware
	Skipper middleware.Skipper
	// AreHeadersDump defines whether to add req headers & resp headers to tracing tags
	AreHeadersDump bool
	// IsBodyDump defines whether to add req body & resp body to attributes
	IsBodyDump bool
	// Repanic configures whether Sentry should repanic after recovery, in most cases it should be set to true,
	// as echo includes it's own Recover middleware what handles http responses
	Repanic bool
	// WaitForDelivery configures whether you want to block the request before moving forward with the response
	// Because Echo's Recover 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
}

Config defines config for the Sentry middleware

Jump to

Keyboard shortcuts

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