Documentation
¶
Overview ¶
Package observability provides observability features for the application.
Index ¶
Constants ¶
View Source
const ( // DefaultPrometheusReadTimeout is the default timeout for reading Prometheus metrics. DefaultPrometheusReadTimeout = 30 * time.Second // DefaultPrometheusReadHeaderTimeout is the default timeout for reading Prometheus headers. DefaultPrometheusReadHeaderTimeout = 10 * time.Second )
Variables ¶
View Source
var ( // ErrUnsupportedObservabilityType is returned when an unsupported observability type is specified. ErrUnsupportedObservabilityType = errors.New("unsupported observability type") // ErrNoImplementation is returned when no implementation is provided for the observability type. ErrNoImplementation = errors.New("no implementation provided for the observability type") )
Functions ¶
func Middleware ¶
func Middleware( settings *config.ObservabilitySettings, lifecycle fx.Lifecycle, logger *slog.Logger, ) (gin.HandlerFunc, error)
Middleware initializes observability features based on the provided settings. It returns a gin.HandlerFunc for middleware or an error if the settings are invalid.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.