Skip to main content

NewSuccessAndFailureCounterVec

Creates a new SuccessAndFailureCounterVec, initializing two Prometheus counter vectors: one for successful events and one for failed events, both with the provided labels.

def NewSuccessAndFailureCounterVec(
scope: promutils.Scope,
labels: ...string
) - > SuccessAndFailureCounterVec

Creates and returns a new SuccessAndFailureCounterVec, which is a Prometheus counter vector for tracking successful and failed events. This function initializes two counter vectors, 'success' and 'failure', associated with the provided Prometheus scope and labels.

Parameters

NameTypeDescription
scopepromutils.ScopeThe Prometheus scope to which the success and failure counter vectors will be registered.
labels...stringA variadic list of string labels to be applied to both the success and failure counter vectors, allowing for metric differentiation based on these labels.

Returns

TypeDescription
SuccessAndFailureCounterVecA SuccessAndFailureCounterVec object containing Prometheus counter vectors for success and failure metrics.