Documentation
¶
Overview ¶
Package httptelemetry provides generic, Prometheus-native HTTP server metrics for any service in this repo. Named httptelemetry, not http, so callers don't need to alias it against net/http.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerMetrics ¶
type ServerMetrics struct {
// contains filtered or unexported fields
}
ServerMetrics holds the registered instruments Middleware records into. Names, buckets and the code/method labels match LabKit v1's metrics.NewHandlerFactory, so the series carry over if LabKit takes this on. promhttp supplies status and method; only the route label is ours.
func NewServerMetrics ¶
func NewServerMetrics(reg prometheus.Registerer) (*ServerMetrics, error)
NewServerMetrics builds and registers HTTP server metrics into reg.
func (*ServerMetrics) Middleware ¶
Middleware records every request that reaches next, labelled by the mux pattern it would match: a pattern is bounded, a request path is not.