Thanks to visit codestin.com
Credit goes to pkg.go.dev

observability

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporters

type Exporters interface {
	Logger() *slog.Logger
	Metrics(context.Context) metrics.Metrics
}

Exporters bundles observability primitives (logger + metrics) for dependency injection. The logger is Go's stdlib *slog.Logger — integrators provide their own slog.Handler.

func NewExporters

func NewExporters(logger *slog.Logger, m metrics.Metrics) (Exporters, error)

NewExporters creates an Exporters bundle. Pass a configured *slog.Logger (with whatever slog.Handler you need) and a Metrics implementation. Neither may be nil; use slog.New(slog.DiscardHandler) and metrics.NewNoopMetrics() if logging or metrics are unwanted.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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