Skip to content

PromQL: counter-derivative range functions (changes/delta/deriv/resets/predict_linear/idelta) unsupported #44

Description

@zzylol

Summary

Counter-derivative / range-vector functions (changes, delta, deriv, resets, predict_linear, idelta, double_exponential_smoothing) parse but are rejected (UnsupportedFunction). Several already have orphaned __GAP pin-tests but no tracking issue.

Corpus impact

108 rejections (5.6%). Breakdown: changes 31, delta 18, resets 16, predict_linear 15, deriv 15, idelta 10, double_exponential_smoothing 3.

High real-alert value — these appear directly in host/disk alerting rules.

Examples

changes(process_start_time_seconds{job="prometheus"}[15m]) > 2
predict_linear(node_filesystem_avail_bytes{...}[3h], 86400) <= 0
delta(systemd_socket_refused_connections_total[5m]) > 3

Notes

  • Error variant: LoweringError::UnsupportedFunction.
  • Existing pin-tests with no issue: changes_function_is_rejected__GAP, delta_function_is_rejected__GAP, predict_linear_function_is_rejected__GAP (crates/lower/tests/awesome_prometheus_alerts.rs); deriv/resets/changes in unsupported_functions_are_rejected (crates/lower/tests/promql_conformance.rs).
  • Each has distinct semantics (counter-reset-aware increase, discrete change counts, linear extrapolation) — they must NOT be aliased to rate/count. Needs distinct intents.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpromqlPromQL front-end lowering (L1→L2)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions