Documentation
¶
Overview ¶
Package observability provides the compatibility HTTP metrics collector. New services should prefer core/telemetry, which emits OpenTelemetry metrics and spans through pluggable providers. This package remains useful for a service that explicitly wants a local Prometheus text endpoint without configuring an OpenTelemetry exporter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics is an in-process HTTP request collector.
Labels are method, route template, and status class. The route comes from Fiber's matched route, not the raw URL, so an endpoint such as /users/:id cannot create an unbounded time-series for every user id.
func (*Metrics) Middleware ¶
Middleware records every request, including failures returned by handlers.
func (*Metrics) Prometheus ¶
Prometheus returns a stable snapshot suitable for scraping or testing.