Skip to content

fix: include otel.jsonl in agent artifact upload when OTLP is enabled#25209

Merged
pelikhan merged 3 commits intomainfrom
copilot/otel-improvement-add-jsonl-upload
Apr 8, 2026
Merged

fix: include otel.jsonl in agent artifact upload when OTLP is enabled#25209
pelikhan merged 3 commits intomainfrom
copilot/otel-improvement-add-jsonl-upload

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

send_otlp_span.cjs appends every OTLP span payload to /tmp/gh-aw/otel.jsonl explicitly 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 — adds OtelJsonlFilename = "otel.jsonl" constant
  • pkg/workflow/compiler_yaml_main_job.go — conditionally appends /tmp/gh-aw/otel.jsonl to artifact paths only when OTLP is enabled (isOTLPEnabled())
// Collect OTLP span mirror — enables post-hoc trace debugging without a live collector.
// Only included when OTLP is configured for this workflow.
if isOTLPEnabled(data) {
    artifactPaths = append(artifactPaths, "/tmp/gh-aw/"+constants.OtelJsonlFilename)
}
  • 55 OTLP-configured .lock.yml workflows — recompiled to include /tmp/gh-aw/otel.jsonl in the "Upload agent artifacts" step; the remaining 127 workflows without OTLP are unaffected

[!WARNING]

- 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>
Copilot AI changed the title [WIP] Add otel.jsonl to agent artifact upload fix: include otel.jsonl in agent artifact upload Apr 8, 2026
Copilot AI requested a review from pelikhan April 8, 2026 00:46
Copy link
Copy Markdown
Collaborator

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot only add this path when optl is enabled

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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 8, 2026

@copilot only add this path when optl is enabled

Done in 2f3e686. otel.jsonl is now only appended to the artifact path list when isOTLPEnabled(data) returns true (i.e., when OTEL_EXPORTER_OTLP_ENDPOINT has been injected into the workflow env). After recompiling, 55 OTLP-configured workflows include the path and the remaining 127 do not.

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:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw /tmp/go-build1689096123/b001/importcfg -pack /tmp/go-build1689096123/b001/_testmain.go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw ,short (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel /opt/hostedtoolcache/go/1.25.8/xrev-parse /usr/bin/git ithub/workflows (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha LP_ENDPOINT k/gh-aw/gh-aw/.github/workflows/bot-detection.lock.yml k/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/sh -f owner=github -f infocmp -1 te &#39;**/*.cjs&#39; &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.prettierignore 64/pkg/tool/linuconfig k/gh-aw/gh-aw/actions/node_modules/.bin/sh --local .cfg 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha h ../../../.pret.prettierignore /tmp/go-build168--log-level=error me: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel /opt/hostedtoolcache/go/1.25.8/x-f /usr/bin/git p-tools-report.lgit /tmp/go-build168rev-parse er: String!, $na--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x/home/REDACTED/work/gh-aw/gh-aw/.github/workflows/craft.lock.yml /usr/bin/git js/**/*.json&#39; --git -buildtags /usr/bin/infocmp--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel git /usr/bin/git /home/REDACTED/worgit config son git rev-�� --show-toplevel git /usr/bin/git rite &#39;**/*.cjs&#39; git x_amd64/compile e_modules/.bin/n--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/ci-doctor.lock.yml /opt/hostedtoolcache/node/24.14.1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/n--show-toplevel tierignore (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --write scripts/**/*.js /opt/hostedtoolcache/node/24.14.1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/n--show-toplevel .prettierignore --log-level=errorev-parse ache/go/1.25.8/x--show-toplevel node /hom�� --write ../../../**/*.json /usr/bin/git --ignore-path ../../../.prettirev-parse /opt/hostedtoolc--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha tags/v4 infocmp /usr/bin/git .js&#39; --ignore-pagit x_amd64/vet de_modules/.bin/--show-toplevel git rev-�� --show-toplevel infocmp /usr/bin/git xterm-color x_amd64/vet son git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha npx prettier --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error 2&gt;&amp;1 ache/go/1.25.8/xrev-parse /home/REDACTED/go/bin/sh ettierignore 9096123/b082/vetrev-parse me: String!) { --show-toplevel sh -c &#34;prettier&#34; --write &#39;../../../**/*.json&#39; &#39;!../../../pkg/workflow/js/**/*.json&#39; --ignore-path ../.git ache/go/1.25.8/x64/pkg/tool/linuconfig /usr/bin/git ithub/workflows (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /home/REDACTED/node_modules/.bin/node tierignore 9096123/b167/vetrev-parse ache/go/1.25.8/x--show-toplevel node /hom�� --write ../../../**/*.json /usr/bin/git --ignore-path ../../../.prettirev-parse /opt/hostedtoolc--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --write scripts/**/*.js /home/REDACTED/.local/bin/node .prettierignore --log-level=errorev-parse r: $owner, name:--show-toplevel node /hom�� --write ../../../**/*.json /usr/bin/git --ignore-path ../../../.prettirev-parse ache/go/1.25.8/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /home/REDACTED/work/gh-aw/gh-aw/node_modules/.bin/node tierignore 9096123/b168/vetrev-parse ache/go/1.25.8/x--show-toplevel node /hom�� --write ../../../**/*.json /usr/bin/git --ignore-path ../../../.prettirev-parse ache/go/1.25.8/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=error ache/go/1.25.8/xconfig /home/REDACTED/work/gh-aw/gh-aw/actions/setup/node_modules/.bin/node tierignore 9096123/b169/vetrev-parse ache/go/1.25.8/x--show-toplevel node /hom�� --write ../../../**/*.json /usr/bin/git --ignore-path ../../../.prettirev-parse /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha */*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.prettierignore config er: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabl--show-toplevel remote.origin.urgit (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha prettier --write /opt/pipx_bin/sh --ignore-path .prettierignore --log-level=erro--show-toplevel sh -c &#34;prettier&#34; --write &#39;../../../**/*.json&#39; &#39;!../../../pkg/workflow/js/**/*.json&#39; --ignore-path ../.git ache/go/1.25.8/x64/pkg/tool/linuconfig /usr/bin/git f/tags/eac588ad8git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha */*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.prettierignore config /home/REDACTED/.local/bin/node l (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha */*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.prettierignore x_amd64/vet bin/node (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel git /usr/bin/git js/**/*.json&#39; --git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha ignore-path ../../../.prettierignore -collect-logs /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/-
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha ignore-path ../../../.prettierignore -collect-logs /opt/hostedtoolcache/go/1.25.8/x-f (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title fix: include otel.jsonl in agent artifact upload fix: include otel.jsonl in agent artifact upload when OTLP is enabled Apr 8, 2026
Copilot AI requested a review from pelikhan April 8, 2026 00:55
@pelikhan pelikhan marked this pull request as ready for review April 8, 2026 02:05
Copilot AI review requested due to automatic review settings April 8, 2026 02:05
@pelikhan pelikhan merged commit ddb7c04 into main Apr 8, 2026
@pelikhan pelikhan deleted the copilot/otel-improvement-add-jsonl-upload branch April 8, 2026 02:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.jsonl in 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[otel-advisor] OTel improvement: include otel.jsonl in agent artifact upload so the JSONL mirror fulfills its stated purpose

3 participants