← Back to Pull requests

docs(promql): document comparisons between aggregations and label parameters #168193

Open
unknown opened this pull request with 210 lines diff across 2 files
View on GitHub
unknown unknown commented on Dec 01, 2026 15:09 UTC
Author

The PromQL docs say that comparing two instant vectors isn't supported, and they don't document identifier parameters in the PROMQL command. Both have worked since 9.6.

Comparisons between aggregations

A comparison between two aggregations with on(...) or ignoring(...), such as sum by (job) (x) > on(job) sum by (job) (y), works with or without bool, also inside another expression. The verifier rejects a comparison only when it has no vector match.

  • Compatibility page: a 9.6+ Supported line, and rows 18 and 19 narrowed to comparisons without on(...) or ignoring(...).

  • The comparison operators' "Differences from Prometheus" note gets the same exception. The note comes from PromqlDocsSupport, so the eq, neq, gt, gte, lt and lte snippets are regenerated with PromqlKibanaDefinitionGeneratorTests.
  • Label parameters

    #154667 added named and positional identifier parameters, such as ??label and ??1, to label lists such as by (...) and on (...). A new "Label parameters" section on the PROMQL command page documents them.

    After this merges, the copies of the PROMQL command page in Kibana and elastic/agent-skills-sandbox need a refresh, as docs/reference/query-languages/promql/AGENTS.md describes.

    🤖 Generated with Claude Code

    Diff: 210 lines (+157 / -53) across 2 files Reviewer: kosabogi Review duration: 2674m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 210 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.320
    Real PR Conversation Timeline
    1 comments
    "Review active on #168193"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.5% (MEDIUM) · Higher = larger blast radius
    36.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.4% · Safe to merge
    19.4%