client_python
GitHubToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

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()