metrics

package
v1.9.2 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: 9 Imported by: 0

Documentation

Overview

Package metrics provides functions for creating Runtime SDK related metrics.

Index

Constants

This section is empty.

Variables

View Source
var (
	// RequestsTotal reports request results.
	RequestsTotal = requestsTotalObserver{
		prometheus.NewCounterVec(prometheus.CounterOpts{
			Subsystem: runtimeSDKSubsystem,
			Name:      "requests_total",
			Help:      "Number of HTTP requests, partitioned by status code, host, hook and response status.",
		}, []string{"code", "host", "group", "version", "hook", "status"}),
	}
	// RequestDuration reports the request latency in seconds.
	RequestDuration = requestDurationObserver{
		prometheus.NewHistogramVec(prometheus.HistogramOpts{
			Subsystem: runtimeSDKSubsystem,
			Name:      "request_duration_seconds",
			Help:      "Request duration in seconds, broken down by hook and host.",
			Buckets: []float64{0.005, 0.025, 0.05, 0.1, 0.2, 0.4, 0.6, 0.8, 1.0, 1.25, 1.5, 2, 3,
				4, 5, 6, 8, 10, 15, 20, 30, 45, 60},
		}, []string{"host", "group", "version", "hook"}),
	}
)

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