NewOperationHistogram
NewOperationHistogram creates 2 histogram metrics for tracking success & failure durations.
def NewOperationHistogram(
scope: promutils.Scope,
labels: ...string
) - > Operation
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
Parameters
| Name | Type | Description |
|---|---|---|
| scope | promutils.Scope | The Prometheus scope to register the new histogram metrics under. |
| labels | ...string | A variadic list of label names to be used for the histogram metrics. An additional "operation" label will be appended automatically. |
Returns
| Type | Description |
|---|---|
Operation | An Operation struct containing success and failure histogram vector metrics. |