metrics

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: Apache-2.0 Imports: 7 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 and hook.",
		}, []string{"code", "host", "group", "version", "hook"}),
	}
	// 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:   prometheus.ExponentialBuckets(0.001, 2, 10),
		}, []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