metrics

package
v0.0.0-...-269d6e4 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AttrOK is a metric tag to indicate a successful operation.
	AttrOK = attribute.Key("status").String("ok")
	// AttrError is a metric tag to indicate a failed operation.
	AttrError = attribute.Key("status").String("error")
)

Functions

func MetricIncrCounter

func MetricIncrCounter(ctx context.Context, err error, m metric.Int64Counter, labels ...attribute.KeyValue)

MetricIncrCounter increments the specified Int64Counter by 1. Depending if err is nil or not, it will use AttrOK or AttrError respectively. This method is a helper for deferring in methods.

Types

This section is empty.

Jump to

Keyboard shortcuts

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