monitor

package
v0.0.0-...-1d3fc3b Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CtxScope   ctxKey = "scope"
	CtxRequest ctxKey = "request"
)

CtxUserID is the context key for the scope

Functions

This section is empty.

Types

type Monitor

type Monitor interface {
	// Any implementation must set the scope to the request context in the middleware
	Middleware(http.Handler) http.Handler
	StartSpan(context.Context, string) (context.Context, Span)
	CaptureMessage(msg string, tags map[string]string)
	CaptureException(err error, tags map[string]string)
	Recover(ctx context.Context, cause any)
	Flush(timeout time.Duration)
}

type Scope

type Scope interface {
	SetTag(key, value string)
	SetUser(id, username, email string)
}

type Span

type Span interface {
	SetTag(key string, value string)
	Finish()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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