用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/github/gh-aw --skill otel-queries命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
GitHub Agentic Workflows (`gh-aw`) is a GitHub CLI extension for writing Agentic Workflows in markdown and compiling them to GitHub Actions.
Operate safely and efficiently inside a gh-aw workflow with a restricted tools/bash allowlist, and correctly triage tool-denial events before they exhaust the session's denial budget.
Optional Sergo examples for cache formats and reporting templates.
基于 SOC 职业分类
正在显示 SKILL.md
| name | otel-queries |
| description | 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.
jq -c '.resourceSpans[]?.scopeSpans[]?.spans[]? | {traceId, name, startTimeUnixNano, endTimeUnixNano, status, attributes}' /tmp/gh-aw/otel.jsonl
jq -c '.resourceSpans[]?.scopeSpans[]?.spans[]? | select(.name | startswith("gh-aw."))' /tmp/gh-aw/otel.jsonl
jq -r '.resourceSpans[]?.scopeSpans[]?.spans[]? as $span | $span.attributes[]? | select(.key == "github.run_id") | .value.stringValue' /tmp/gh-aw/otel.jsonl
jq -c '.resourceSpans[]?.scopeSpans[]?.spans[]? | select(any(.attributes[]?; .key == "github.run_id") | not) | {traceId, name}' /tmp/gh-aw/otel.jsonl
jq -c '.resourceSpans[]?.scopeSpans[]?.spans[]? | select(.traceId == $traceId)' --arg traceId "TRACE_ID_HERE" /tmp/gh-aw/otel.jsonl
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.