Skip to content

Add Datadog CLI-usage dashboard + JSON validity gate#67

Merged
alexkroman merged 3 commits into
mainfrom
datadog-dashboard-json-lint
Jun 11, 2026
Merged

Add Datadog CLI-usage dashboard + JSON validity gate#67
alexkroman merged 3 commits into
mainfrom
datadog-dashboard-json-lint

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

Summary

Two related additions, prompted by a long debugging session into "no telemetry data showing in Datadog" for the aai CLI (the telemetry shipped in #66).

1. Datadog dashboard (docs/datadog/)

  • cli-usage-dashboard.json — importable dashboard built on the source:aai-cli logs from aai_cli/telemetry.py. Four groups: Adoption & Usage (runs, unique devices, top commands, version adoption), Reliability & Errors (error rate, outcomes over time, top error types, exit codes), Performance (duration p50/p90/p95, slowest commands), Environment & Reach (OS, CI vs interactive, Python/CLI version).
  • No template variables, so the count tiles render with zero facet setup; grouped tiles populate once facets exist.
  • README.md documents import + the facet prerequisite and caveats (error-rate includes expected user errors; @device_id ≈ installs not people; ~1–2 min indexing lag).

2. JSON validity gate (scripts/json_lint.py + scripts/check.sh)

  • New scripts/json_lint.py parses every tracked + staged *.json (committed dashboards, init-template vercel.json, recorded API fixtures) so a malformed file fails the gate loudly instead of silently downstream (a bad dashboard just won't import).
  • Wired into check.sh just before the prettier step. Validity only — the recorded tests/fixtures/api/*.json snapshots are not reformatted.

Context / what the debugging found

The "no data" symptom was not a code bug: the CLI sender and event shape are correct (verified a probe with the full @datadog/browser-logs query-param set behaves identically). Root cause was org-side — the Datadog org had no log index, so aai-cli logs were ingested (visible in Live Tail) but never indexed (invisible to dashboards/search). Resolved by creating a source:aai-cli-scoped index; dashboard now populates.

Testing

  • ./scripts/check.shAll checks passed. (new JSON gate runs as part of it; validates 15 JSON files).
  • Verified json_lint.py exits 1 on a malformed JSON file.
  • Dashboard JSON imports cleanly into Datadog and tiles populate against real source:aai-cli data.

🤖 Generated with Claude Code

alexkroman-assembly and others added 3 commits June 11, 2026 13:01
Drop the `assembly` half-block wordmark from the bare-command welcome
screen; `print_banner()` now emits only the one-line version + tagline
header. Update the onboard tests to assert on the tagline header instead
of the block glyphs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Importable dashboard (docs/datadog/cli-usage-dashboard.json) + README, built
on the source:aai-cli logs from aai_cli/telemetry.py: adoption, reliability/
errors, performance, and environment widgets. No template variables so it
renders without facet setup; grouped widgets populate once facets exist.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
scripts/json_lint.py parses every tracked + staged *.json (committed
dashboards, init-template vercel.json, recorded API fixtures) so a malformed
file fails the gate loudly instead of silently downstream. Validity only --
the recorded tests/fixtures/api/*.json snapshots are not reformatted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexkroman alexkroman enabled auto-merge (squash) June 11, 2026 20:14
@alexkroman alexkroman merged commit fbcaaff into main Jun 11, 2026
11 checks passed
@alexkroman alexkroman deleted the datadog-dashboard-json-lint branch June 11, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants