metrics

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TotalResponses = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Subsystem: "steve_api",
			Name:      "total_requests",
			Help:      "Total count API requests",
		},
		[]string{resourceLabel, methodLabel, codeLabel},
	)

	ResponseTime = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Subsystem: "steve_api",
			Name:      "request_time",
			Help:      "Request times in ms",
		},
		[]string{resourceLabel, methodLabel, codeLabel})
)

Functions

func IncTotalResponses

func IncTotalResponses(resource, method, code string)

func RecordResponseTime

func RecordResponseTime(resource, method, code string, val float64)

Types

This section is empty.

Jump to

Keyboard shortcuts

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