Query analytics with the CLI

Retrieve summaries, live telemetry, dashboards, historical aggregates, raw events, and immutable exports.

Before you begin

Obtain analytics:read and, for durable exports, analytics:export. Select the namespace and define the narrowest time window, supported grouping, and filters that answer the operational question. Use Run workflow state when you need an authoritative current answer.

Steps

  1. Read the recent summary with constal analytics summary --output json.
  2. Query hot telemetry with analytics live or the Console-shaped analytics dashboard, supplying reviewed JSON through --body @query.json.
  3. Run a historical aggregate or bounded raw query:
sh
constal analytics query --body @historical-query.json --output json
  1. Check the returned window, grouping, filters, generation time, and truncated flag. Narrow the query rather than assuming the limit is a pagination cursor.
  2. Create an immutable result with analytics export --body @historical-query.json, retain its content-addressed reference, and download it with analytics export-get <ref> --out report.json.

Verify

Compare incident-critical aggregates with exact Run journals or workflow state. Confirm custom event id/version and bounded dimensions match the SDK declaration. Ensure exported files contain only the authorized namespace and redacted detail level.

Next steps

Read Instrument analytics with the SDK, Query and export analytics, and the generated Analytics command reference.