metrics

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	RequestsTotal   *prometheus.CounterVec
	RequestDuration *prometheus.HistogramVec
	ActiveRequests  *prometheus.GaugeVec
	ErrorsTotal     *prometheus.CounterVec
	RateLimitHits   *prometheus.CounterVec
	// contains filtered or unexported fields
}

Metrics encapsulates Prometheus metrics for the server.

func NewMetrics

func NewMetrics() *Metrics

NewMetrics creates a new Metrics instance with a custom registry.

func (*Metrics) Handler

func (m *Metrics) Handler() http.Handler

Handler returns a handler for the metrics endpoint.

Jump to

Keyboard shortcuts

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