observability

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 17 Imported by: 0

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.

Jump to

Keyboard shortcuts

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