fix: include otel.jsonl in agent artifact upload when OTLP is enabled#25209
fix: include otel.jsonl in agent artifact upload when OTLP is enabled#25209
Conversation
- Add OtelJsonlFilename constant to pkg/constants/job_constants.go - Append /tmp/gh-aw/otel.jsonl to artifact paths in compiler_yaml_main_job.go - Update golden test fixtures to include the new path - Recompile all 182 .lock.yml workflow files Agent-Logs-Url: https://github.com/github/gh-aw/sessions/58107e42-879b-44ec-a884-8711dc26e5f2 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Use isOTLPEnabled() to conditionally append otel.jsonl to artifact paths. Recompile all 182 workflows — 55 OTLP-configured workflows include the path, 127 without OTLP do not. Revert golden fixture changes since test fixtures have no OTLP configured. Agent-Logs-Url: https://github.com/github/gh-aw/sessions/44236b0a-84c0-4a9b-958a-166593d7b9d6 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 2f3e686. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR ensures the local OTLP span mirror (/tmp/gh-aw/otel.jsonl) written by send_otlp_span.cjs is actually uploaded as part of the agent artifact when OTLP is enabled, enabling post-hoc trace debugging without requiring a live collector.
Changes:
- Add a new constant (
OtelJsonlFilename = "otel.jsonl") for the OTLP mirror filename. - Update the main job YAML compiler to include
/tmp/gh-aw/otel.jsonlin the unified artifact upload only when OTLP is configured (isOTLPEnabled(data)). - Recompile OTLP-enabled locked workflows to include the new artifact path in the “Upload agent artifacts” step.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/compiler_yaml_main_job.go | Conditionally appends /tmp/gh-aw/otel.jsonl to unified artifact paths when OTLP is enabled. |
| pkg/constants/job_constants.go | Introduces OtelJsonlFilename constant for the OTLP JSONL mirror filename. |
| .github/workflows/*.lock.yml | Updates OTLP-configured locked workflows to upload /tmp/gh-aw/otel.jsonl with agent artifacts. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 57/57 changed files
- Comments generated: 0
send_otlp_span.cjsappends every OTLP span payload to/tmp/gh-aw/otel.jsonlexplicitly so it can be "inspected via GitHub Actions artifacts without needing a live collector" — but the file was never actually uploaded.github_rate_limits.jsonl, written by the same pattern, is uploaded. This closes that gap.Changes
pkg/constants/job_constants.go— addsOtelJsonlFilename = "otel.jsonl"constantpkg/workflow/compiler_yaml_main_job.go— conditionally appends/tmp/gh-aw/otel.jsonlto artifact paths only when OTLP is enabled (isOTLPEnabled()).lock.ymlworkflows — recompiled to include/tmp/gh-aw/otel.jsonlin the "Upload agent artifacts" step; the remaining 127 workflows without OTLP are unaffected