What is a time series in Prometheus, and how is it identified (metric name plus labels)? [Basic]
Answer
A Prometheus time series is a stream of timestamped samples uniquely identified by the metric name and the full label set. Changing any label value creates a different time series.
Technical explanation
For example, http_requests_total{method='GET',status='200',pod='a'} and http_requests_total{method='GET',status='500',pod='a'} are different series.
This model is powerful for aggregation but dangerous if labels have unbounded values.
Prometheus stores numeric samples; labels are metadata used for selection and grouping.
Hands-on example
Hands-on: query count by (__name__)({job='checkout'}) to see metric names, then count without(instance,pod) (http_requests_total) to reduce per-pod series. Never add user_id, request_id, or order_id as metric labels because each value creates a new series.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Observability interview questions
- What are the Prometheus metric types (counter, gauge, histogram, summary)? [Basic]
- What is the difference between a counter and a gauge? [Basic]
- What is the difference between a symptom-based and a cause-based alert, and which is better? [Basic]
- Why are multi-window, multi-burn-rate alerts better than a single threshold? [Basic]
- How does Prometheus collect metrics — what is the pull model and scraping? [Basic]
- What is a burn rate, and how do you alert on it? [Basic]
- What is a scrape target, and how does service discovery find them? [Basic]
- What is the difference between an exporter and instrumenting your app directly? [Basic]