sentry

package
v0.0.0-...-183aff7 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BreadcrumbToSentry(breadcrumb *errmontypes.Breadcrumb) *sentry.Breadcrumb

BreadcrumbToSentry converts a Breadcrumb to the Sentry format.

func EventToSentry

func EventToSentry(ev *errmontypes.Event) *sentry.Event

EventToSentry converts an Event to the Sentry format.

func FuncNameToSentryModule

func FuncNameToSentryModule(funcName string) string

FuncNameToSentryModule converts a funcation name (see runtime.Frame) to a sentry module name.

func GoroutinesToSentry

func GoroutinesToSentry(goroutines []errmontypes.Goroutine, currentGoroutineID int) []sentry.Thread

GoroutinesToSentry converts goroutines to the Sentry format.

func HTTPRequestToSentry

func HTTPRequestToSentry(request *errmon.HTTPRequest) *sentry.Request

HTTPRequestToSentry converts HTTP request info to the Sentry format.

func LevelToSentry

func LevelToSentry(level loggertypes.Level) sentry.Level

LevelToSentry returns the closest sentry analog of a given logger.Level

func New

func New(
	sentryClient *sentry.Client,
	opts ...Option,
) errmon.ErrorMonitor

New wraps a Sentry client and returns a new instance, which implements errmon.ErrorMonitor.

func PackageToSentry

func PackageToSentry(pkg *errmontypes.Package) sentry.SdkPackage

PackageToSentry converts a Package to the Sentry format.

func SpansToSentry

func SpansToSentry(spans tracer.Spans) []*sentry.Span

SpansToSentry converts tracer spans to the Sentry format.

func StackTraceToSentry

func StackTraceToSentry(stackTrace runtime.StackTrace) *sentry.Stacktrace

StackTraceToSentry converts a stack trace to the Sentry format.

func UserToSentry

func UserToSentry(user *errmontypes.User) sentry.User

UserToSentry converts an user structure to the Sentry format.

Types

type Emitter

type Emitter struct {
	SentryClient *sentry.Client
}

Emitter is a wrapper for a Sentry client to implement errmon.Emitter.

func NewEmitter

func NewEmitter(sentryClient *sentry.Client) *Emitter

NewEmitter returns a new instance of Emitter.

func (*Emitter) Emit

func (h *Emitter) Emit(ev *errmon.Event)

Emit implements errmon.Emitter.

func (*Emitter) Flush

func (*Emitter) Flush()

Flush implements errmon.Emitter

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is an abstract option, which defines the behavior of an ErrorMonitor.

type OptionCallerFrameFilter

type OptionCallerFrameFilter runtime.PCFilter

OptionCallerFrameFilter defines how to find the caller frame. It should return false on each function which cannot be used as a caller frame.

For example, this might be useful to skip frames of a ErrorMonitor implementation.

type UserEmail

type UserEmail string

UserEmail is a field value type used to define an email.

type UserIPAddress

type UserIPAddress string

UserIPAddress is a field value type used to define an user IP address.

Jump to

Keyboard shortcuts

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