# HELP and # TYPE metadata, and practical guidance for avoiding high-cardinality issues.
A Prometheus metric has three main parts:
- a descriptive name,
- a set of labels (key/value pairs),
- and a numeric value recorded at a specific time.
cpu labels:

Time series
A “time series” in Prometheus is a stream of timestamped values that share the same metric name and identical label sets (same keys and values). In other words: metric name + labels = time series. Examples:Metric metadata: HELP and TYPE
Prometheus text exposition may include two helpful metadata comments per metric:# HELP— a short human-readable description of the metric.# TYPE— the metric type (counter,gauge,histogram,summary).
Including
# HELP and # TYPE in your exporters makes metrics easier to understand and reduces ambiguity when other engineers query or consume them.Metric types
Prometheus defines four primary metric types. Here’s a concise reference you can use when designing instrumentation.
Histograms collect counts for bucket boundaries (buckets are cumulative). For example, with buckets 0.2s, 0.5s, 1s you get counts of requests that completed in less than 0.2s, less than 0.5s (including those under 0.2s), and less than 1s (including those under 0.5s):


Metric names and labels
Metric names should be descriptive and follow Prometheus naming conventions: ASCII letters, numbers, underscores, and colons. Avoid colons in custom metrics — they are typically reserved for recording rules. Labels are key/value pairs that further qualify a metric and let you slice and group metrics by attributes such aspath, method, or instance. Label names may include ASCII letters, numbers, and underscores.
Why labels are useful — a brief example:
A naive approach would create separate metrics per endpoint:
path label:
method="GET"). Each unique combination of label keys and values creates a distinct time series.

__name__. Example:
__name__) are internal to Prometheus.
Prometheus also automatically assigns two labels to every scraped metric:
instance— the target address that was scraped.job— the scrape job name from your Prometheus configuration.
prometheus.yml:
Avoid high-cardinality labels (for example, user IDs, session IDs, or highly variable full request paths). Every distinct label value combination creates a new time series, which can quickly exhaust memory and storage in Prometheus.
Quick references and further reading
- Prometheus data model and time series: Prometheus concepts — data model
- Node Exporter guide: Node Exporter
- Convert Unix timestamps: Epoch Converter
- Use meaningful metric names.
- Favor labels over separate metric names when the distinguishing characteristic is a dimension (e.g.,
path,method). - Choose histograms if you need to aggregate distributions across instances; use summaries for per-instance quantiles when aggregation across instances is not required.
- Design labels to keep cardinality manageable.