metrics

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReportRequest

func ReportRequest(f func() error, skip ...int) (retErr error)

ReportRequest reports a request to Prometheus. This function automatically registers a metric (if one does not already exist) with the default register. The calling function's package name is used as the subsystem name and the function name is used for the operation label. This function also labels the request as successful or not, and records the time spent in a separate metric.

func ReportRequestWithThroughput

func ReportRequestWithThroughput(f func() (int64, error)) error

ReportRequestWithThroughput functions the same as ReportRequest, but also reports the throughput in a separate metric.

Types

This section is empty.

Jump to

Keyboard shortcuts

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