metrics

package
v1.96.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpResponseByPatternDurationHist *prometheus.HistogramVec = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name: "darkstat_http_by_pattern_duration_seconds_hist",
		Help: "Duration histogram of http request in seconds",
	}, []string{"pattern", "status_code"})

	HttpResponseByIpFinishedTotal *prometheus.CounterVec = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "darkstat_http_by_ip_finished_total",
		Help: "Finished http requests by ip total",
	}, []string{"ip", "status_code"})
	HttpResponseByIpDurationSum *prometheus.GaugeVec = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "darkstat_http_by_ip_duration_seconds_sum",
		Help: "Duration sum of http request by ip in seconds",
	}, []string{"ip", "status_code"})

	// Technically u need only Sum and Count? May be buckets are overkill
	HttpResponseByPatternBodySizeHist *prometheus.HistogramVec = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name: "darkstat_http_by_pattern_body_size_bytes_hist",
		Help: "Body size histogram of http response in bytes",

		Buckets: []float64{10_000, 25_000, 50_000, 100_000, 250_000, 500_000, 1_000_000, 2_500_000, 5_000_000, 10_000_000},
	}, []string{"pattern", "status_code"})
)

Functions

This section is empty.

Types

type Metronom

type Metronom struct {
	Reg *prometheus.Registry
}

func NewMetronom

func NewMetronom(mux *http.ServeMux) *Metronom

func (*Metronom) Run

func (m *Metronom) Run()

Jump to

Keyboard shortcuts

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