Prometheus 3.0 introduces an experimental info() function that simplifies enriching metrics with metadata labels from info metrics. The traditional PromQL join approach requires specifying identifying labels, info metrics, and data labels explicitly, making queries complex and error-prone. The info() function wraps queries in a single call, automatically handles label joins, and solves the "churn problem" where changing non-identifying labels cause many-to-many matching errors. It automatically selects the time series with the latest sample, eliminating join failures during infrastructure changes. The function works particularly well with OpenTelemetry resource attributes and requires enabling via a feature flag. Current limitations include fixed job/instance identifying labels and default target_info metric usage, but future versions aim to support all info metrics automatically.

9m read timeFrom prometheus.io
Post cover image
Table of contents
The Problem: Complex Joins and The Churn ProblemBasic SyntaxSelecting Different Info MetricsReal-World Use CasesBefore and After: Side-by-Side ComparisonTechnical BenefitsGetting StartedCurrent Limitations and Future PlansGiving FeedbackConclusion

Sort: