NewHistogramStopWatch
Creates a new labeled HistogramStopWatch. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys for information about how to configure that.
def NewHistogramStopWatch(
name: string,
description: string,
scope: promutils.Scope,
opts: MetricOption
) - > HistogramStopWatch
Creates a new labeled HistogramStopWatch. Label keys must be set before instantiating a counter. See labeled.SetMetricsKeys for information about how to configure that.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The name of the histogram stopwatch, which will be sanitized for metric compatibility. |
| description | string | A descriptive string for the histogram stopwatch, providing context for its purpose. |
| scope | promutils.Scope | The Prometheus scope to which the histogram stopwatch will be registered. |
| opts | MetricOption | Optional configurations for the histogram stopwatch, such as emitting an unlabeled metric or adding additional labels. |
Returns
| Type | Description |
|---|---|
HistogramStopWatch | A new HistogramStopWatch instance configured with the provided name, description, scope, and options. |