Versions in this module Expand all Collapse all v1 v1.0.0 Apr 27, 2026 Changes in this version + var ErrInvalidActuator = errors.New("observability: invalid actuator") + var ErrInvalidHealthIndicator = errors.New("observability: invalid health indicator") + var ErrInvalidLogging = errors.New("observability: invalid logging") + var ErrInvalidMetrics = errors.New("observability: invalid metrics") + var ErrInvalidTracing = errors.New("observability: invalid tracing") + func ConfigureLogging(loader config.Loader, opts ...LoggingOption) (*slog.Logger, error) + func ConfigureTracing(loader config.Loader, opts ...TracingOption) (trace.TracerProvider, func(context.Context) error, error) + func Logger(namespace string) *slog.Logger + func NewHTTPMetricsObserver(registry *prometheus.Registry) (web.RouteObserver, error) + func NewRegistry() (*prometheus.Registry, error) + func RegisterActuatorRoutes(server web.HTTPServer, checker HealthChecker, info InfoProvider) error + func RegisterMetricsRoute(server web.HTTPServer, registry *prometheus.Registry, ...) error + func Registry() *prometheus.Registry + type ComponentHealth struct + Details map[string]any + Error string + Status Status + type CompositeHealthChecker struct + func HealthCheckerFromContainer(container *core.Container) (*CompositeHealthChecker, error) + func NewCompositeHealthChecker(indicators ...HealthIndicator) (*CompositeHealthChecker, error) + func (c *CompositeHealthChecker) Check(ctx context.Context) HealthResponse + type HealthChecker interface + Check func(context.Context) HealthResponse + type HealthIndicator interface + Health func(context.Context) ComponentHealth + Name func() string + type HealthResponse struct + Components map[string]ComponentHealth + Status Status + type InfoOption func(*defaultInfoProvider) + func WithBuildInfo(build map[string]string) InfoOption + func WithVersion(version string) InfoOption + type InfoProvider interface + Info func(context.Context) InfoResponse + func NewInfoProvider(loader config.Loader, opts ...InfoOption) InfoProvider + type InfoResponse struct + Build map[string]string + Profiles []string + Version string + type LoggingConfig struct + Level string + Levels map[string]string + type LoggingOption func(*loggingOptions) error + func WithDefaultNamespace(ns string) LoggingOption + func WithLoggingConfig(cfg LoggingConfig) LoggingOption + func WithLoggingOutput(w io.Writer) LoggingOption + type MetricsRouteOption func(*metricsRouteOptions) + func WithMetricsGuard(guard web.Guard) MetricsRouteOption + type Status string + const StatusDown + const StatusUp + type TracingConfig struct + Enabled bool + Endpoint string + Exporter string + ServiceName string + type TracingOption func(*tracingOptions) + func WithTracingConfig(cfg TracingConfig) TracingOption + func WithTracingOutput(w io.Writer) TracingOption