otel-queries
FreeNo executable scriptsNot checkedAnalyze gh-aw OpenTelemetry traces from JSONL mirrors or OTLP backends.
by github★ 5,758 GitHub starsAbout this skill
OTel Queries
Use this skill to inspect gh-aw OpenTelemetry/OTLP data and answer telemetry questions without re-deriving trace fields, backend filters, and diagnostics.
When To Use
Use this skill for requests such as:
- analyze OTEL or OTLP data
- inspect traces in Grafana, Tempo, Sentry, Honeycomb, or Datadog
- explain why a workflow or agent run is slow or failing
- compare run phases, error clusters, or span attributes
- identify the best observability or performance improvement
- close the loop from telemetry into code or workflow changes
Do not use this skill for instrumentation-only tasks that do not require reading telemetry. For pure emit-side work, start with the existing OTLP code and docs.
Primary Goal
Reduce a broad telemetry task to one tight loop:
- Find the cheapest trustworthy telemetry source.
- Run a small fixed set of common queries.
- Confirm one concrete bottleneck, missing attribute, or broken correlation path.
- Answer the user's telemetry question directly.
- Recommend or implement a follow-on optimization only when the evidence supports it.
Telemetry Sources In Priority Order
Prefer sources in this order unless the user says otherwise:
- Local artifacts or mirrors already in the workspace.
/tmp/gh-aw/otel.jsonlfor gh-aw spans.- Live OTLP backend data through an MCP server or supported tool — Copilot CLI spans are exported directly to the configured OTLP backend (no local file mirror) and must be queried there, filtered by the
github.run_idresource attribute. - Static code inspection only, when no telemetry is available.
Use the cheapest source that can disconfirm the current hypothesis.
Standard Analysis Loop
Always answer these questions in order before expanding scope.
1. Do spans exist for the run or workflow at all?
Look for:
traceId- span
name service.namegithub.repositorygithub.run_id
If these are missing, the problem is likely export, filtering, or trace propagation rather than optimization.
2. Is trace continuity intact?
Check whether spans that should belong together share the same:
- trace ID
- parent span lineage
- run ID
- workflow reference
If setup, agent, and conclusion spans are not connected, fix correlation before interpreting latency.
3. Which phase is actually slow or failing?
Bucket spans into phases:
- setup
- agent execution
- tool or safe-output calls
- conclusion
Prefer wall-clock duration and count by span name prefix before reading code.
4. Do the spans contain enough attributes to explain the slowdown or failure?
Minimum diagnostic attributes to verify:
service.versiondeployment.environmentgithub.repositorygithub.run_idgithub.event_namegithub.workflow_refgh-aw.workflowgh-aw.engine- conclusion or failure attributes
If the slow or failing span lacks the attribute needed to group, filter, or explain it, the right next step may be an instrumentation change rather than a runtime change.
5. Is the problem systemic or isolated?
Check whether the pattern repeats across:
- multiple runs of the same workflow
- multiple jobs in the same trace
- one engine only
- one event type only
- one environment only
Do not propose broad architectural changes for a single outlier trace.
Common Queries
Use these backend-agnostic query shapes first. Translate them into the native query language or MCP tool calls for the active backend.
Query 1: Recent gh-aw spans
Filter for the last 24 hours and service.name = gh-aw.
Return:
- timestamp
- trace ID
- span name
- duration
- status
github.run_idgithub.workflow_ref
Query 2: Slowest spans by name
Group by span name and sort by:
- p95 duration
- max duration
- count
Use this to find whether the bottleneck is setup, agent, tool, or conclusion work.
Query 3: Errors by span name
Filter for error status and group by:
- span name
- status message
- workflow ref
- engine
Use this to separate exporter failures from workflow logic failures.
Query 4: Missing core attributes
Sample recent spans and explicitly record whether each span includes:
service.versiongithub.repositorygithub.run_idgithub.event_namedeployment.environment
If a backend supports has or exists filters, use them. Otherwise inspect a small sample manually.
Query 5: Trace integrity for one failing run
Pick one trace ID and inspect the full trace. Record:
- root span name
- child spans present
- missing expected spans
- parent-child continuity gaps
Query 6: Repeated cost or latency hotspot
For agent-heavy traces, group by:
- engine
- workflow
- job
- tool span name
Then compare count, total duration, and p95 duration.
Local JSONL Recipes
When telemetry is available as JSONL, prefer shell plus jq over broad file reading.
Recent spans
jq -c '.resourceSpans[]?.scopeSpans[]?.spans[]? | {traceId, name, startTimeUnixNano, endTimeUnixN
Install otel-queries in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the otel-queries skill do?
Analyze gh-aw OpenTelemetry traces from JSONL mirrors or OTLP backends.
How do I install the otel-queries skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the otel-queries skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic