Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/patch-remove-copilot-otel-jsonl-docs.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .github/skills/otel-queries/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ Prefer sources in this order unless the user says otherwise:

1. Local artifacts or mirrors already in the workspace.
2. `/tmp/gh-aw/otel.jsonl` for gh-aw spans.
3. `/tmp/gh-aw/copilot-otel.jsonl` for Copilot CLI spans.
4. Live OTLP backend data through an MCP server or supported tool.
5. Static code inspection only, when no telemetry is available.
3. 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_id` resource attribute.
4. Static code inspection only, when no telemetry is available.

Use the cheapest source that can disconfirm the current hypothesis.

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-otel-backends.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .github/workflows/smoke-otel-backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ echo "OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT:+set}"
echo "OTEL_EXPORTER_OTLP_HEADERS=${OTEL_EXPORTER_OTLP_HEADERS:+set}"
echo "GH_AW_OTLP_ENDPOINTS=${GH_AW_OTLP_ENDPOINTS:+set}"
echo "OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME:-}"
echo "COPILOT_OTEL_FILE_EXPORTER_PATH=${COPILOT_OTEL_FILE_EXPORTER_PATH:-}"

echo "=== OTEL configured backend hosts ==="
if [ -n "${GH_AW_OTLP_ENDPOINTS:-}" ]; then
Expand Down
8 changes: 3 additions & 5 deletions docs/src/content/docs/guides/open-telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ You usually do not need to configure or memorize these built-in attributes. They
When observability is enabled, trace data is also mirrored to local JSONL files and uploaded in the `agent` artifact:

- `otel.jsonl` for spans emitted by gh-aw JavaScript helpers
- `copilot-otel.jsonl` for spans emitted by Copilot CLI

Copilot CLI inherits the standard OpenTelemetry environment variables (`OTEL_EXPORTER_OTLP_ENDPOINT`, `OTEL_EXPORTER_OTLP_HEADERS`, `OTEL_SERVICE_NAME`, `OTEL_RESOURCE_ATTRIBUTES`) and exports its own spans directly to the configured OTLP backend. Query them there, filtered by the `github.run_id` resource attribute (see [ADR-34450](https://github.com/github/gh-aw/blob/main/docs/adr/34450-inject-otel-resource-attributes-for-child-otel-sdk-correlation.md)).

See [Artifacts](/gh-aw/reference/artifacts/) for artifact download details.

Expand Down Expand Up @@ -228,17 +229,14 @@ await otlp.logSpan('my-scanner', {

Attribute values are sanitized automatically before the payload is exported or mirrored. Matching secret-like keys are redacted, and very long string values are truncated. The same sanitization is applied to both OTLP export and the local JSONL mirror.

For debugging, every span emitted by `logSpan` is appended as a sanitized JSON line to `/tmp/gh-aw/otel.jsonl`, even when `OTEL_EXPORTER_OTLP_ENDPOINT` is not set. When OTLP is configured, Copilot CLI spans are written to `/tmp/gh-aw/copilot-otel.jsonl` and forwarded to configured endpoints at the end of the run. Both files are included in the `agent` artifact when OTLP is enabled.
For debugging, every span emitted by `logSpan` is appended as a sanitized JSON line to `/tmp/gh-aw/otel.jsonl`, even when `OTEL_EXPORTER_OTLP_ENDPOINT` is not set. This file is included in the `agent` artifact when OTLP is enabled. Copilot CLI spans are not mirrored to a local file; they are exported directly to the configured OTLP backend and should be queried there.

```bash
# Download agent artifacts for a run
gh aw logs <run-id> --artifacts agent

# Inspect spans emitted by your tool
cat otel.jsonl | jq 'select(.resourceSpans[].scopeSpans[].spans[].name | startswith("my-tool"))'

# Inspect Copilot CLI spans
cat copilot-otel.jsonl | jq '.resourceSpans'
```

<details>
Expand Down
1 change: 0 additions & 1 deletion docs/src/content/docs/reference/artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ The unified `agent` artifact contains agent job outputs:
- GitHub API rate limit logs (`github_rate_limits.jsonl`)
- Token usage summary (`agent_usage.json`) — aggregated totals only; per-request data is in `firewall-audit-logs`
- `otel.jsonl` — OTLP span mirror written by gh-aw's JavaScript span exporters when `observability.otlp` is configured
- `copilot-otel.jsonl` — OTLP spans emitted by Copilot CLI when `observability.otlp` is configured

For OTLP configuration, runtime environment variables, and span semantics, see the [OpenTelemetry guide](/gh-aw/guides/open-telemetry/).

Expand Down
1 change: 0 additions & 1 deletion docs/src/content/docs/reference/open-telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ These attributes are emitted when experiments are active for a run.
When observability is enabled, trace data is also mirrored to local JSONL files and uploaded in the <code>agent</code> artifact:

- <code>otel.jsonl</code> for spans emitted by gh-aw JavaScript helpers
- <code>copilot-otel.jsonl</code> for spans emitted by Copilot CLI

See the [OpenTelemetry guide](/gh-aw/guides/open-telemetry/) for setup and [Artifacts](/gh-aw/reference/artifacts/) for artifact download details.

Expand Down
2 changes: 0 additions & 2 deletions scratchpad/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ Common file paths referenced in workflow files:
| `/tmp/gh-aw/aw_info.json` | File | Workflow info JSON | Workflow metadata and configuration |
| `/tmp/gh-aw/awf-config.json` | File | AWF config JSON | Agentic Workflow Firewall (AWF) configuration file |
| `/tmp/gh-aw/base` | Directory | Base checkout | Base repository checkout for git diff operations |
| `/tmp/gh-aw/copilot-otel.jsonl` | File | Copilot OTEL log | OpenTelemetry spans from Copilot engine requests |
| `/tmp/gh-aw/cache-memory` | Directory | Cache memory storage | Persistent cache data across runs |
| `/tmp/gh-aw/cache-memory-chroma` | Directory | Chroma cache storage | Chroma vector database cache |
| `/tmp/gh-aw/cache-memory-focus-areas` | Directory | Focus areas cache | Cached focus area data |
Expand Down Expand Up @@ -649,7 +648,6 @@ GitHub Actions runner images used across compiled workflows:
├── cache-memory-repo-audits/ # Audit cache
├── comment-memory/ # Comment memory
│ └── default.md
├── copilot-otel.jsonl # Copilot OpenTelemetry spans
├── experiments/ # A/B experiments
│ ├── assignments.json
│ └── state.json
Expand Down
4 changes: 3 additions & 1 deletion specs/otel-observability-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ Mirror-write failure MUST produce a structured diagnostic but SHOULD NOT fail th

The mirror writer MUST create parent directories with restrictive permissions, MUST use append-safe writes, SHOULD tolerate concurrent writers, MUST NOT write exporter credentials, MUST apply the same content-capture and redaction policy as remote export, and SHOULD rotate or bound file size.

When telemetry artifacts are uploaded, the artifact SHOULD contain `otel.jsonl`, runtime-specific companion files such as `copilot-otel.jsonl` when present, and no secret headers or credentials. A manifest containing schema version, signal counts, byte sizes, and redaction mode MAY be added as an optional companion file.
When telemetry artifacts are uploaded, the artifact SHOULD contain `otel.jsonl` and no secret headers or credentials. As of the removal in PR #32280, gh-aw does not produce a runtime-specific companion mirror file for Copilot CLI spans; Copilot CLI is expected to export its spans directly to the configured OTLP backend using the injected `OTEL_EXPORTER_OTLP_ENDPOINT`/`OTEL_EXPORTER_OTLP_HEADERS`/`OTEL_RESOURCE_ATTRIBUTES` environment variables (see ADR-34450). A manifest containing schema version, signal counts, byte sizes, and redaction mode MAY be added as an optional companion file.

---

Expand Down Expand Up @@ -953,6 +953,8 @@ context is added to outcome spans or links.

### Version 0.4.0 (Working Draft, June 18, 2026)

- **Removed** (documentation correction, August 2026): References to a `copilot-otel.jsonl` local mirror/companion artifact. PR #32280 removed the file-export pipeline that produced it (`COPILOT_OTEL_FILE_EXPORTER_PATH` injection, artifact inclusion, and forwarding script); Copilot CLI spans are now expected to be exported directly to the configured OTLP backend and queried there.

- **Changed**: Reframed 0.4.0 as a non-breaking compatibility revision rather than a replacement telemetry standard.
- **Preserved**: `observability.otlp`, direct OTLP export, `OTEL_EXPORTER_OTLP_ENDPOINT`, `OTEL_EXPORTER_OTLP_HEADERS`, `GITHUB_AW_OTEL_TRACE_ID`, `GITHUB_AW_OTEL_PARENT_SPAN_ID`, `TRACEPARENT` compatibility, built-in setup/conclusion spans, `gen_ai.system`, `gen_ai.usage.total_tokens`, and raw OTLP JSONL mirror behavior.
- **Clarified**: Standard OpenTelemetry attributes such as `gen_ai.provider.name` and CI/CD attributes may be emitted as additive aliases, not replacements for existing fields.
Expand Down
Loading