Skip to main content

NewAPI

No overview available.

def NewAPI(
scope: promutils.Scope
) - > API

Initializes a new API instance with success and failure stopwatches. This function is used to create a new API object, setting up its internal metrics for tracking successful and failed operations.

Parameters

NameTypeDescription
scopepromutils.ScopeThe Prometheus scope used to register and manage the metrics for the API instance.

Returns

TypeDescription
APIA new API object configured with success and failure stopwatches.