monitor

package
v0.0.0-...-68b491e Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(debug bool) *slog.Logger

func NewTestLogger

func NewTestLogger(debug bool) *slog.Logger

func Propagator

func Propagator() propagation.TextMapPropagator

Propagator returns a TextMapPropagator.

func StartTestTracing

func StartTestTracing(ctx context.Context, integration bool, tpAddr string) (func(context.Context) error, error)

StartTestTracing returns a noop trace provider for testing and tpAddr is not considered. If integration is set to true, tpAddr is forwarded to StartTracing.

func StartTracing

func StartTracing(ctx context.Context, tpAddr string) (func(context.Context) error, error)

StartTracing bootstraps OpenTelemetry by setting a propagator and a trace provider with the given trace provider addr. Use the returned shutdown func to gracefully shutdown OpenTelemetry in case of no error.

func TraceID

func TraceID(span trace.Span) string

func TraceIDFromCtx

func TraceIDFromCtx(ctx context.Context) string

func Tracer

func Tracer(name string) otrace.Tracer

Tracer returns a Tracer with the given name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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