Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation struct {
Success *prometheus.HistogramVec
Failure *prometheus.HistogramVec
}
func NewOperationHistogram ¶
NewOperationHistogram creates 2 histogram metrics for tracking success & failure durations.
The resulting operations requires len(labels) + 1 labels, where the last label is the respective "operation".
Histograms have higher performance impact on Prometheus server when calculating quantiles: https://prometheus.io/docs/practices/histograms/#quantiles
func (Operation) Start ¶
func (o Operation) Start(values ...string) OperationTimer
type OperationTimer ¶
type OperationTimer struct {
Start time.Time
Success prometheus.Observer
Failure prometheus.Observer
}
func (OperationTimer) Stop ¶
func (o OperationTimer) Stop(err *error)
type SuccessAndFailureCounter ¶
type SuccessAndFailureCounter struct {
// contains filtered or unexported fields
}
func NewSuccessAndFailureCounter ¶
func NewSuccessAndFailureCounter(scope promutils.Scope) SuccessAndFailureCounter
func (SuccessAndFailureCounter) Inc ¶
func (c SuccessAndFailureCounter) Inc(err *error)
type SuccessAndFailureCounterVec ¶
type SuccessAndFailureCounterVec struct {
// contains filtered or unexported fields
}
func NewSuccessAndFailureCounterVec ¶
func NewSuccessAndFailureCounterVec(scope promutils.Scope, labels ...string) SuccessAndFailureCounterVec
func (SuccessAndFailureCounterVec) Inc ¶
func (c SuccessAndFailureCounterVec) Inc(err *error, labels prometheus.Labels)
Click to show internal directories.
Click to hide internal directories.