metrics

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Namespace = "promrelay"

Namespace is the metrics namespace for the application.

Variables

View Source
var BuildInfo = promauto.NewGaugeFunc(
	prometheus.GaugeOpts{
		Namespace: Namespace,
		Subsystem: "build",
		Name:      "info",
		Help: "A metric with a constant '1' value labeled by version, goversion, gitcommit, " +
			"gitbranch, builddate from which the application was built.",
		ConstLabels: prometheus.Labels{
			"version":   buildinfo.Version,
			"goversion": buildinfo.GoVersion,
			"gitcommit": buildinfo.GitCommit,
			"gitbranch": buildinfo.GitBranch,
			"builddate": buildinfo.BuildDate,
		},
	},
	func() float64 { return 1 },
)

BuildInfo is the collector for build information of the application.

View Source
var RelayInFlightRequests = promauto.NewGauge(
	prometheus.GaugeOpts{
		Namespace:   Namespace,
		Subsystem:   "relay",
		Name:        "in_flight_requests",
		Help:        "Number of relay requests currently being served in the Prometheus relay exporter.",
		ConstLabels: prometheus.Labels{},
	},
)

RelayInFlightRequests is the collector for the number of relay requests currently being served.

View Source
var RelayRequestDuration = promauto.NewHistogramVec(
	prometheus.HistogramOpts{
		Namespace:   Namespace,
		Subsystem:   "relay",
		Name:        "request_duration_seconds",
		Help:        "Distribution of relay request durations in the Prometheus relay exporter.",
		Buckets:     []float64{.1, .2, .4, 1, 3, 8, 20, 60, 120},
		ConstLabels: prometheus.Labels{},
	},
	[]string{"code"},
)

RelayRequestDuration is the collector for the distribution of relay request durations.

View Source
var RelayRequestsTotal = promauto.NewCounterVec(
	prometheus.CounterOpts{
		Namespace:   Namespace,
		Subsystem:   "relay",
		Name:        "requests_total",
		Help:        "Total number of relay requests in the Prometheus relay exporter.",
		ConstLabels: prometheus.Labels{},
	},
	[]string{"code"},
)

RelayRequestsTotal is the collector for the total number of relay requests.

View Source
var RelayResponseSize = promauto.NewHistogramVec(
	prometheus.HistogramOpts{
		Namespace:   Namespace,
		Subsystem:   "relay",
		Name:        "response_size_bytes",
		Help:        "Distribution of relay response sizes in the Prometheus relay exporter.",
		Buckets:     prometheus.ExponentialBuckets(100, 10, 8),
		ConstLabels: prometheus.Labels{},
	},
	[]string{"code"},
)

RelayResponseSize is the collector for the distribution of relay response sizes.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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