| title | Instrumenting |
|---|---|
| weight | 2 |
Six metric types are available. Pick based on what your value does:
| Type | Value goes | Use for |
|---|---|---|
| Counter | only up | requests served, errors, bytes sent |
| Gauge | up and down | queue depth, active connections, memory usage |
| Histogram | observations in buckets | request latency, request size — when you need quantiles in queries |
| Summary | observations (count + sum) | request latency, request size — when average is enough |
| Info | static key-value pairs | build version, environment metadata |
| Enum | one of N states | task state, lifecycle phase |
See the Prometheus documentation on metric types and instrumentation best practices for deeper guidance on choosing between Histogram and Summary.
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()