Ask Copilot about your telemetry
Ask questions in chat such as “why is my slowest request slow?” or “what did my AI agent spend its time on?”. Answers are computed from the data the receiver holds, and each comes with buttons that open the trace, span, logs or source line it refers to.
Turn it on
AI access is off by default. Enable the otel.ai.enabled user setting (Settings → search “otel.ai”).
{
"otel.ai.enabled": true
}
A workspace settings.json cannot turn it on, so a cloned repository can't enable it for you.
Use @otel in chat
| Ask | What happens |
|---|---|
@otel why is my slowest request slow? | Finds the request, walks its critical path, compares it with similar requests and cites trace and span IDs. |
@otel /slow | Finds the slowest recent request and explains where the time went. |
@otel /errors | Groups recent failing requests by endpoint and explains the top failure. |
@otel /agent | Summarizes the latest AI-agent run: LLM vs. tool time, token usage, slowest and failed tools. |
@otel what regressed since my baseline? | Compares current traffic with the active service map baseline and explains the biggest regressions, with example traces. |
@otel which attributes will blow up my telemetry bill? | Lists high-cardinality attributes, metric labels and noisy services with fixes, and a cost estimate if you set prices. |
@otel why does checkout have so many metric series? | Names the metrics with the most series and the label driving them, with redacted example values and what to group by instead. |
@otel what got noisier since my baseline? | Lists new, grown and resolved cardinality findings and volume changes since the active baseline. |
Tools for agent mode
In agent mode, or with any chat participant, reference the tools directly with #, e.g. “#otelTraces show failing checkout requests from the last 10 minutes”.
| Tool | Reference | Returns |
|---|---|---|
otel_listServices | #otelServices | Applications, instances and what each holds |
otel_searchTraces | #otelTraces | Traces matching the trace query syntax, listed or grouped (by root, service, time or a root attribute), with p50/p95 and error rate |
otel_findSpans | #otelSpans | Spans across recent traces with self-time, optionally grouped by service and name |
otel_getTrace | #otelTrace | One trace: critical path, top self-time spans, errors, time per service, correlated logs |
otel_compareTraces | #otelCompare | Where a trace spent more time than a baseline (explicit or the median of similar traces) |
otel_queryLogs | #otelLogs | Logs by service, severity, text, trace or time, newest first |
otel_queryMetrics | #otelMetrics | Metric list, or per-series last/min/max/avg/p50/p95 and counter rates |
otel_getServiceMap | #otelServiceMap | Service dependencies with call counts and error rates |
otel_genAiSummary | #otelAgent | An AI-agent trace (OpenTelemetry gen_ai.* conventions): time split, tokens per model, slowest and failed calls |
otel_compareBaseline | #otelBaseline | Current traffic (or another baseline) compared with a service map baseline: what regressed, improved, appeared or disappeared, by service, call or operation |
otel_analyzeCardinality | #otelCardinality | High-cardinality attributes and metric labels, ID-like values, noisy services, operations and log patterns, volume per day, a cost estimate when you set prices, and changes since the active baseline. Optional service, instanceId, session, signal (all, spans, logs, metrics) and limit. |
Your model, your choice
Results go only to the language model selected in the chat model picker. That includes bring-your-own-key and local models (for example Ollama) configured in VS Code. The extension stores no API keys.
Privacy
The tools are read-only, each call is confirmed, and results are redacted before they reach the model you selected. See Privacy & data for exactly what is sent and how to inspect it.
Limits
- Answers only cover what is still in the in-memory buffers; older data may have been evicted (see the
otel.retention.*settings). - Span searches look at the newest 1000 traces.
- Each result is capped at
otel.ai.maxResultItemsitems and 24,000 characters. - Requires VS Code 1.95 or later and a chat model that supports tool calling.
Try it without an app
From a clone of the repository, start the receiver and run npm run push:genai to send a sample AI-agent trace, then ask @otel /agent.