Interview Observability

What is PromQL, and what is an instant vector versus a range vector? [Basic]

Answer

PromQL is Prometheus's query language. An instant vector is a set of time series at one evaluation timestamp; a range vector is a set of time series with samples over a time window such as 5 minutes.

Technical explanation

Instant vectors are used for current values, aggregations, and alert expressions at a point in time.

Range vectors are required by functions such as rate(), increase(), avg_over_time(), max_over_time(), and histogram calculations.

Understanding vector types prevents common errors such as applying sum directly to a range vector.

Hands-on example

Examples: http_requests_total is an instant vector. http_requests_total[5m] is a range vector. rate(http_requests_total[5m]) converts the range vector into an instant vector of per-second rates, which can then be aggregated with sum by (service).

Preparing for an interview?

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

← All Observability questions