instrument

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DriverAPIMetricRecorderFn

func DriverAPIMetricRecorderFn(operation string, err *error) func()

DriverAPIMetricRecorderFn returns a function that can be used to record a prometheus metric for driver API calls. NOTE: a pointer to an error (which itself is a fat interface pointer) is necessary to enable the callers of this function to enclose this call into a `defer` statement.

func RecordDriverAPIMetric

func RecordDriverAPIMetric(err error, operation string, invocationTime time.Time)

RecordDriverAPIMetric records a prometheus metric capturing the total duration of a successful execution for any driver method (e.g. CreateMachine, DeleteMachine etc.). In case an error is returned then a failed counter metric is recorded.

Types

This section is empty.

Jump to

Keyboard shortcuts

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