Skip to main content
client_python
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

Instrumenting

Four types of metric are offered: Counter, Gauge, Summary and Histogram. See the documentation on metric types and instrumentation best practices on how to use them.

Disabling _created metrics

By default counters, histograms, and summaries export an additional series suffixed with _created and a value of the unix timestamp for when the metric was created. If this information is not helpful, it can be disabled by setting the environment variable PROMETHEUS_DISABLE_CREATED_SERIES=True or in code:

from prometheus_client import disable_created_metrics
disable_created_metrics()