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.
Click to show internal directories.
Click to hide internal directories.