npx skills add ...
npx skills add github/gh-aw --skill otel-queries
npx skills add github/gh-aw --skill otel-queries
Analyze gh-aw OpenTelemetry traces from JSONL mirrors or OTLP backends.
Use this skill to inspect gh-aw OpenTelemetry/OTLP data and answer telemetry questions without re-deriving trace fields, backend filters, and diagnostics.
Use this skill for requests such as:
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.
Reduce a broad telemetry task to one tight loop:
Prefer sources in this order unless the user says otherwise:
/tmp/gh-aw/otel.jsonl for gh-aw spans./tmp/gh-aw/copilot-otel.jsonl for Copilot CLI spans.Use the cheapest source that can disconfirm the current hypothesis.
Always answer these questions in order before expanding scope.
Look for:
traceIdnameservice.namegithub.repositorygithub.run_idIf these are missing, the problem is likely export, filtering, or trace propagation rather than optimization.
Check whether spans that should belong together share the same:
If setup, agent, and conclusion spans are not connected, fix correlation before interpreting latency.
Bucket spans into phases:
Prefer wall-clock duration and count by span name prefix before reading code.
Minimum diagnostic attributes to verify:
service.versiondeployment.environmentgithub.repositorygithub.run_idgithub.event_namegithub.workflow_refgh-aw.workflowgh-aw.engineIf 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.
Check whether the pattern repeats across:
Do not propose broad architectural changes for a single outlier trace.
Use these backend-agnostic query shapes first. Translate them into the native query language or MCP tool calls for the active backend.
Filter for the last 24 hours and service.name = gh-aw.
Return:
github.run_idgithub.workflow_refGroup by span name and sort by:
Use this to find whether the bottleneck is setup, agent, tool, or conclusion work.
Filter for error status and group by:
Use this to separate exporter failures from workflow logic failures.
Sample recent spans and explicitly record whether each span includes:
service.versiongithub.repositorygithub.run_idgithub.event_namedeployment.environmentIf a backend supports has or exists filters, use them. Otherwise inspect a small sample manually.
Pick one trace ID and inspect the full trace. Record:
For agent-heavy traces, group by:
Then compare count, total duration, and p95 duration.
When telemetry is available as JSONL, prefer shell plus jq over broad file reading.
Adapt the same six common queries to the active backend instead of inventing new analysis questions.
service.name="gh-aw" and a short time window.service.name.After answering the telemetry question, choose the next step based on the evidence.
Prioritize in this order:
Prefer the smallest change that unlocks the most operational clarity.
When using this skill, produce findings in this shape:
Start with these files when telemetry indicates an instrumentation or correlation problem:
actions/setup/js/send_otlp_span.cjsactions/setup/js/action_setup_otlp.cjsactions/setup/js/action_conclusion_otlp.cjsactions/setup/js/otlp.cjsactions/setup/js/generate_observability_summary.cjsactions/setup/js/aw_context.cjspkg/workflow/observability_otlp.godocs/src/content/docs/guides/custom-otlp-attributes.mdAvoid these common mistakes:
After using this skill, the agent should be able to move from raw OTel data to a grounded answer without re-deriving the telemetry playbook.
jq -c '.resourceSpans[]?.scopeSpans[]?.spans[]? | select(.traceId == $traceId)' --arg traceId "TRACE_ID_HERE" /tmp/gh-aw/otel.jsonl