Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>RuleLens: LogQL, MetricsQL & OTel Alert StudioNew to Visual Studio Code? Get it now.
RuleLens: LogQL, MetricsQL & OTel Alert Studio

RuleLens: LogQL, MetricsQL & OTel Alert Studio

RuleLens

|
1 install
| (0) | Free
Offline LogQL, MetricsQL & LogsQL syntax highlighting, VMRule/Loki alert YAML linter, OpenTelemetry Structured Metadata checker, and local unit-test sandbox.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

RuleLens

Static analysis and local test sandbox for LogQL, MetricsQL, and LogsQL alerts — inside VS Code and Cursor.

Catch the alert rule that would have fired late, returned zero series, or quietly blown up your Loki query bill — before it reaches production.

RuleLens Local Pipeline X-Ray & Alert Simulator

100% Local · Zero Log Upload. Parsing, linting, pipeline evaluation, and unit tests all run in the editor process. Your log lines never leave your machine. Try the same engine in the browser at rulelens.app — the page runs offline and uploads nothing.

What it does

  • Syntax highlighting for .logql, .metricsql, .logsql, and injected expr: values inside Kubernetes / Loki / VMRule YAML, including alerts, recording rules, and multi-document files.
  • RL001–RL008 static checks with one-click Quick Fix on VMRule, PrometheusRule, Loki ruler, and vmalert groups:
    • RL001 — LogQL, MetricsQL, and LogsQL syntax errors, including invalid regular expressions, localized and precisely positioned.
    • RL002 / RL003 — OpenTelemetry troubleshooting: dotted OTel attributes in a stream selector are rewritten to underscore form and non-indexed attributes are moved out of {} into structured-metadata filters, so the query actually matches the data Loki stores.
    • RL004 — dotted label access in Go templates is rewritten to {{ index $labels "k8s.pod.name" }}.
    • RL005 — a heavy parser placed before a line filter is reordered, cutting scanned bytes and cloud query cost.
    • RL006 — high-cardinality labels inside by (...) are flagged before they explode series count and OOM the cluster.
    • RL007 / RL008 — parsers that can attach __error__ are surfaced, and bare log selectors that can never fire a numeric alert are reported as errors.

OpenTelemetry dotted labels and structured metadata fixed in one click

One Quick Fix turns {service.name="pay", trace_id="…"} into an indexed selector with a structured-metadata filter, so the alert matches what Loki actually stores.

  • MetricsQL WITH hover expansion, parsed by the official VictoriaMetrics parser compiled to WebAssembly and executed locally.

MetricsQL WITH template expanded on hover by local WebAssembly

Hover any WITH template to see the fully expanded expression — computed locally, with no query sent anywhere.

  • Three-pane local sandbox in the bottom panel: pipeline stage X-Ray with kept/filtered rows and extracted labels, alert verdict with the exact computed value against the threshold, and the rendered annotation notification preview. Feed it raw mixed logs (stack traces included) or an OTLP JSON payload.

  • .logql-test.yaml regression suites saved next to your rules, replayable locally with one command.

Privacy and support

Log lines, alert YAML, OTLP samples, and test files stay in the editor process and are never uploaded. The only network request is an explicit license activation: when you submit a license key, it is sent to https://license.rulelens.app/api/activate together with an instance name. The returned license is verified offline with Ed25519, so every later check works without a network connection. The Creem API key and signing key never ship in this extension.

Core syntax highlighting, RL001–RL008 diagnostics and Quick Fixes, MetricsQL WITH hover, and daily local sandbox runs are included out of the box; optional Pro features are documented at rulelens.app.

Questions, bug reports, and license help: support@rulelens.app.

License

Apache-2.0.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft