Skip to main content
Use dashboards as code when you want a repeatable, reviewable way to create metric dashboards from scripts, repos, or agent workflows. The same definition shape works across:

Definition format

Dashboard definitions are versioned JSON manifests.

Valid widget query sources

Every widget’s query.source field must be one of: traces is the right choice when the underlying service already records the span (via the Squasher edge SDK or any OTLP client) and you don’t want to also emit a duplicate duration metric. Span attributes are queryable via group_by and filters (service, status, or any custom span attribute name).

API

Apply a definition in one request:
Example request body:
If you want to update an existing dashboard instead of creating a new one, include dashboard_id beside definition.

CLI

List dashboards:
List templates:
Create from a template:
Execute a dashboard query directly:
Use --from and --to for absolute query windows:
Filter log/error dashboard queries with search syntax:
Apply a definition from a file:
To update an existing dashboard in place:

MCP

The hosted MCP server exposes the same workflows through Code Mode. Agents should call search for the operation they need, then execute the generated squasher.request(...) example. Useful searches:
  • search("dashboards.list")
  • search("dashboards.listTemplates")
  • search("dashboards.executeQuery")
  • search("dashboards.inspectQuery")
  • search("dashboards.apply")
Example prompt:

Agent handoff

Use this prompt when asking an agent to create or update dashboards:
The manifest format also powers Squasher’s built-in operational dashboard templates, so the same apply surface works for custom dashboards instead of a UI-only flow.