pedantic.run
Lint PromQL Queries
Last verified:
What is pedantic.run?
pedantic.run is an online static analyzer and linting service for Prometheus PromQL queries that detects inefficient or unsafe query patterns before they run. It parses PromQL and returns actionable findings such as negative-regex matchers, bare selectors, high-cardinality groupings, and other patterns that cause runtime cost or incorrect results. The tool is offered as a hosted API and web UI so users can validate queries without installing software, and it emphasizes privacy by statelessly analyzing queries (they are not stored). pedantic.run is aimed at SREs, observability engineers, and developers who write PromQL and want fast feedback to avoid costly or slow queries in production. Key features include a query linter that highlights specific problematic constructs, explanatory messages with recommended fixes, and integration-friendly API endpoints for automating pre-deploy checks.
pedantic.run pricing
Pricing model: Freemium
Pedantic Run provides a free, no-install web UI and API endpoint for ad-hoc linting of PromQL queries (no account required for basic usage). Paid plans are intended for teams that require higher-volume API usage, CI/CD integration, and SLA-backed availability; paid tiers include increased API rate limits, team management features, and priority support. The website describes a usage-based tiering model (free tier for casual use, paid plans for automated/enterprise usage) with exact limits and enterprise pricing available by contacting the vendor.
pedantic.run pros
- Detects negative-regex matchers that are expensive at runtime
- Identifies bare selectors that can produce broad, costly results
- Flags high-cardinality groupings which increase query cost
- Provides clear, human-readable explanations for each finding
- Stateless analysis — queries are not persisted after linting
- Hosted API lets teams lint queries without local setup
- Web UI for quick ad-hoc checks of single queries
- Suitable for CI integration via API to block unsafe queries
- Fast static analysis with immediate feedback
- Focuses specifically on PromQL semantics and performance
- Helps prevent production incidents caused by expensive queries
- Minimal access surface — no need to connect to Prometheus
- Produces deterministic lint results useful for automation
- Low friction for onboarding SREs and developers
- Clear categorization of smells (cost, correctness, stability)
pedantic.run cons
- Only analyzes PromQL — not other query languages or metrics formats
- Does not execute queries or measure real runtime cost
- Hosted service may not fit organizations requiring on-prem only
- Does not automatically rewrite queries; offers guidance only
- Limited to static pattern detection and may miss runtime context
- No direct integration into Prometheus server as a plugin
- Findings may produce false positives for intentionally broad queries
- No built-in historical trend or telemetry about linted queries
Frequently asked questions about pedantic.run
What exactly does Pedantic Run check in a PromQL query?
Pedantic Run parses PromQL and reports patterns that are known to be expensive or unsafe, such as negative regular-expression matchers, bare metric selectors that match many time series, high-cardinality label groupings, and operator misuses; each finding includes an explanation and a recommended mitigation.
Are my queries stored or logged when I use the service?
The service performs stateless analysis and is designed not to persist queries; lint requests are analyzed and results returned without long-term storage, which minimizes exposure of sensitive query content.
Can I integrate Pedantic Run into my CI pipeline?
Yes — Pedantic Run exposes an API that teams can call from CI to lint queries before deployment, allowing automation to fail builds when queries violate configured safety or cost rules.
Does Pedantic Run run my PromQL queries against Prometheus or measure real cost?
No — it performs static analysis only and does not execute queries or connect to Prometheus for runtime profiling; its findings are based on syntactic and semantic patterns known to cause high cost or incorrect results.
Can Pedantic Run automatically rewrite my queries to be more efficient?
No — Pedantic Run provides explanatory diagnostics and recommendations but does not currently offer automatic query rewriting; users must apply suggested fixes manually.
Is Pedantic Run open source or self-hostable?
The website emphasizes a hosted lint API and web UI; while related projects and older 'pedantic' repos exist in various ecosystems, the hosted pedantic.run offering is presented primarily as a service rather than a packaged, officially self-hostable product.
Which PromQL patterns are considered highest priority to fix?
The highest-priority items called out are negative-regex matchers (which force full-series scanning), bare selectors without label filters (which match many series), and wide groupings by high-cardinality labels — these patterns most directly cause high CPU, memory, and query slowdown.
Does the tool support team accounts and rate limits for automated use?
Yes — paid plans are described for teams that need higher API volumes and integration; these paid tiers include increased rate limits and team-oriented features, while the free tier supports casual, lower-volume usage.
Can Pedantic Run help with correctness issues, not just performance?
Yes — beyond performance smells, the analyzer flags correctness and stability issues in PromQL such as unsafe aggregation, ambiguous label usage, and constructs that may return unexpected results across metric types, and it provides guidance to avoid logical mistakes.
How do I get enterprise support or SLA for the service?
For enterprise requirements like an SLA, higher throughput, or managed onboarding, the website directs teams to contact the vendor for custom pricing and support arrangements tailored to enterprise needs.