Telemetry Architecture
Data flows from wherever your assistant runs — your machine or a Claude Code cloud session — to a dashboard in a few hops, all over OpenTelemetry.
How it works
- Your assistant emits OpenTelemetry. Each tool sends one or more OTLP/HTTP signals (logs, traces, and/or metrics) describing every AI call — for example Copilot CLI emits spans only (see Data Collected).
- The Cloud Run collector receives and normalizes it. A shared OpenTelemetry Collector
running on Cloud Run (
europe-central2) receives the data, maps each provider's fields onto the commongen_ai.*convention, and also derivesgen_ai.callsandgen_ai.durationmetrics from spans (via the spanmetrics connector). - It exports to Google Cloud Observability. The collector forwards to
telemetry.googleapis.com. Logs land in the project's_Defaultlog bucket; spans land in the_Tracebucket. - Log/Trace buckets are linked into BigQuery. The
_Defaultbucket surfaces asai_usage_logs._AllLogsand the_Tracebucket asai_usage_spans._AllSpans. - A central view unifies providers.
ai_usage_pii.v_gen_ai_callsis aUNIONacross the provider branches (Claude Code, Copilot Chat, Codex, Copilot CLI), giving one queryable table of AI calls. - Looker Studio reads the view to render the usage dashboard.
Copilot desktop and CLI attribution
The macOS Copilot desktop app uses the same telemetry runtime as Copilot CLI. In Aliz's
verification with desktop app version 1.0.25, both exported the raw resource attribute
service.name=github-copilot. The shared BigQuery view labels those calls copilot-cli, so
that dashboard label includes both desktop-app and standalone CLI usage.
The sampled spans contained no client identifier that the view could use to separate them.
COPILOT_OTEL_SOURCE_NAME only changed a local log line in the tested runtime; it did not change
exported attributes or dashboard attribution. Separating these clients would require Copilot
instrumentation to emit a client identifier. Newer runtimes have not been rechecked here; see
the original verification.
Retention and network access
BigQuery view definitions live in BigQuery itself, not in the ai-telemetry repo. The raw _Trace
bucket has a 30-day retention, but telemetry used for dashboard reporting is retained before raw
trace expiry. The dashboard's historical data is therefore not limited to 30 days. Only direct
queries against the raw _Trace bucket have that lookback limit.
For a locked-down network, an optional local Docker relay can sit between the assistant and the
Cloud Run collector; see the
ai-telemetry repo.