Skip to main content

SuccessAndFailureCounterVec

No overview available.

Methods


Inc()

@classmethod
def Inc(
err: *error,
labels: prometheus.Labels
)

Increments either the success or failure counter based on the provided error. This method is used to track the success and failure rates of operations.

Parameters

NameTypeDescription
err*errorThe error object. If err is nil, the success counter is incremented; otherwise, the failure counter is incremented.
labelsprometheus.LabelsA set of Prometheus labels to associate with the counter increment, allowing for categorized metrics.