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
- Read the recent summary with
constal analytics summary --output json. - Query hot telemetry with
analytics liveor the Console-shapedanalytics dashboard, supplying reviewed JSON through--body @query.json. - Run a historical aggregate or bounded raw query:
sh
constal analytics query --body @historical-query.json --output json- Check the returned window, grouping, filters, generation time, and
truncatedflag. Narrow the query rather than assuming the limit is a pagination cursor. - Create an immutable result with
analytics export --body @historical-query.json, retain its content-addressed reference, and download it withanalytics 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.