Skip to content

add gen_ai.request.model to conclusion span attributes#28739

Merged
pelikhan merged 2 commits intomainfrom
copilot/otel-advisor-add-gen-ai-request-model
Apr 27, 2026
Merged

add gen_ai.request.model to conclusion span attributes#28739
pelikhan merged 2 commits intomainfrom
copilot/otel-advisor-add-gen-ai-request-model

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 27, 2026

sendJobConclusionSpan captured awInfo.model but only pushed it onto agentAttributes — the sub-span emitted solely when jobName === "agent" with valid timing data. This made model unavailable on the primary gh-aw.*.conclusion span, breaking model-level grouping/filtering in Grafana/Honeycomb/Datadog and leaving non-agent jobs with no model attribute anywhere.

Changes

  • send_otlp_span.cjs: push gen_ai.request.model onto the main attributes array (conclusion span) alongside the existing gh-aw.engine.id, using the same conditional guard:
    if (engineId) attributes.push(buildAttr("gh-aw.engine.id", engineId));
    if (model)    attributes.push(buildAttr("gen_ai.request.model", model));
  • send_otlp_span.test.cjs: two new tests — verifies the attribute appears on the conclusion span when model is set in aw_info.json, and is absent when not set.

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 gh repo view --json owner,name --jq .owner.login + "/" + .name ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE t/internal/formainit GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo 8292�� 3258307873/.github/workflows 9275009/b026/vet.cfg x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json sonschema/annotations.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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, .object.type] | @tsv /tmp/TestCollectWorkflowFiles_WithImports810849193/001 rev-parse /usr/bin/git 5260621/b141/_pkgit .cfg 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linuTest User /usr/bin/git g_.a 9275009/b143/vet/opt/hostedtoolcache/node/24.14.1/x64/bin/npm x_amd64/compile git (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, .object.type] | @tsv 1500-33927/test-693985419 --jq /usr/bin/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, .object.type] | @tsv 1500-33927/test-193709331/.github/workflows 9275009/b220/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -p github.com/goccy--version -lang=go1.21 Wo/bJFsyISU_LIYuVgol9MA/jtMHmSR1Test User 3623�� 1500-33927/test-336834139 /tmp/go-build3829275009/b006/vet.cfg 1/x64/bin/node go1.25.8 -c=4 -nolocalimports /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuorigin (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linutest@example.com /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 9275009/b462/_pkgit -goversion 9275009/b462=> git rev-�� --show-toplevel git /usr/bin/git runs/20260427-14git /home/REDACTED/worrev-parse /usr/bin/git 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, .object.type] | @tsv mplied -buildtags 9275009/b419/vet.cfg -errorsas set -nilfunc /opt/hostedtoolcache/go/1.25.8/x^remote\..*\.gh-resolved$ -uns�� g/cli /tmp/go-build3829275009/b277/vet.cfg /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link 001' 001' 64/bin/go /opt/hostedtoolcache/go/1.25.8/x-importcfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv runs/20260427-141500-33927/test-336834139 -trimpath ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet l github.com/githurev-parse -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet rev-�� --show-toplevel -goversion .cfg -c=4 -nolocalimports -importcfg git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv run l e/git plate-expressiongit GO111MODULE x_amd64/compile e/git rev-�� --show-toplevel x_amd64/compile /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE x_amd64/vet node (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, .object.type] | @tsv --show-toplevel /opt/hostedtoolcremote /usr/bin/git -bool -buildtags 1/x64/bin/node git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuremote /usr/bin/git SameOutput293449git =master /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json o x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv xec.js (or misc/wasm/ for Go <1.24)" GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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, .object.type] | @tsv --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/gh mLsRemoteWithReagit mLsRemoteWithRearev-parse 64/pkg/tool/linu--show-toplevel gh run download 3 /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile test-logs/run-3 V4ci/NWzImF-917Hrev-parse x_amd64/compile /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (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, .object.type] | @tsv se 9275009/b113/vet.cfg /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -json GO111MODULE x_amd64/vet /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel 64/pkg/tool/linu-tests /usr/bin/gh ortcfg .cfg 64/pkg/tool/linu--show-toplevel gh run download 1 /usr/bin/gh test-logs/run-1 eFae/0ahu769BnKYrev-parse ache/go/1.25.8/x--show-toplevel gh (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv ry=1 /tmp/go-build3829275009/b086/vet.cfg .cfg =receive GO111MODULE 64/bin/go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv runs/20260427-141500-33927/test-336834139 -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� -aw/git/ref/tags/v2.0.0 -tests bject.type] | @tsv -json GO111MODULE x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv git-receive-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen1290328103git git-receive-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen1290328103rev-parse /usr/bin/git -json GO111MODULE x_amd64/compile git -C /tmp/TestGuardPolicyTrustedUsersRequiresMinIntegrity3891471146/001 config /usr/bin/git remote.origin.urgit GO111MODULE x_amd64/vet 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, .object.type] | @tsv /tmp/gh-aw-test-runs/20260427-141500-33927/test-1457002403/.github/workflows rev-parse /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -json GO111MODULE x_amd64/compile /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags 0"}} -errorsas -ifaceassert layTitle git (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, .object.type] | @tsv user.email ings.cjs n-dir/git user.email st/suppress-warnrun tions/setup/js/n/tmp/go-handler-test-ApD9Kr/slow.go forks.js rev-�� HEAD st/suppress-warnings.cjs (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv . 1/x64/bin/node $name) { hasDiscussionsEnabled } } user.email tions/setup/js/ncheckout k/node_modules/.-b git init�� -q (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv . 1/x64/bin/node ndor/bin/git user.email tions/setup/js/n--experimental-import-meta-resolve es/.bin/node git init�� -q st/suppress-warn--conditions ache/node/24.14.development d5c2464ccf557b9b/usr/bin/gh 65b00938..HEAD /git st/dist/workers/-f (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch user.email test@example.com r: $owner, name: $name) { hasDiscussionsEnabled } } --require 0f3d07ea63b0b793-C a8 1/x64/bin/node ve HEAD tions/setup/js/node_modules/viteowner=github r: $owner, name: $name) { hasDiscussionsEnabled } } -exist a203c3daa62b2cf9-C ode-gyp-bin/git tions/setup/js/nshow (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch ithub/workflows -m ock.yml e_modules/.bin/ggit git n-dir/git go run ithub/workflows git repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } feature$(whoami)git mp modules/@npmcli//home/REDACTED/work/gh-aw/gh-aw go (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, .object.type] | @tsv -277012459/base.md -277012459/new.md /usr/bin/git ortcfg .cfg 64/pkg/tool/linu--show-toplevel /usr/bin/git remo�� -v 64/pkg/tool/linu-dwarf=false /usr/bin/git 368894594/.githugit GO111MODULE x_amd64/compile git (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, .object.type] | @tsv /tmp/TestGuardPolicyMinIntegrityOnlymin-integrittest-logs/run-3 rev-parse /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -json GO111MODULE x_amd64/compile /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu-trimpath -o /tmp/go-build3829275009/b441/_pkg_.a -trimpath /usr/bin/git -p main -lang=go1.25 git (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, .object.type] | @tsv /tmp/TestGuardPolicyMinIntegrityOnlymin-integrittest-logs/run-1 remote /usr/bin/git -json r/common.go x_amd64/compile git -C /tmp/gh-aw-test-runs/20260427-141500-33927/test-812058053/custom/workflows config /usr/bin/git remote.origin.urgit GO111MODULE x_amd64/vet git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-04-20 GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url ortc�� MajS116uD .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-03-28 GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env ortcfg .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/alias GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-01-27 GOMOD GOMODCACHE x_amd64/vet ortc�� ned-imports-enabled-with-env-template-expressions-in-body.md .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE fips140deps/cpu GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/link GOINSECURE fips140cache ache/go/1.25.8/xuser.name 64/pkg/tool/linuTest User (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 eFae/0ahu769BnKYz-hV-eFae ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-buildtags (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE /go-yaml GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 .cfg 64/pkg/tool/linu-nolocalimports GOINSECURE GOMOD 5260621/b011/sym--show-toplevel 64/pkg/tool/linu/tmp/go-build3829275009/b459/_testmain.go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE 5260621/b133/ GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 .cfg 64/pkg/tool/linux_amd64/compile GOINSECURE fips140hash 5260621/b011/sym--show-toplevel 64/pkg/tool/linux_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE 5260621/b011/sysconfig ache/go/1.25.8/xuser.email 64/pkg/tool/linutest@example.com (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 O8a-/w8uJjXynBhCHi02xO8a- x_amd64/compile GOINSECURE fips140/tls12 GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name zm1t/ybsydLQ-bM8eUCGDzm1t 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 V4ci/NWzImF-917Hk3aRqV4ci x_amd64/compile GOINSECURE g/x/text/transforev-parse GOMODCACHE x_amd64/compile -c g_.a _isA/iz-VlEV3Z-CBIoY6_isA ck --format=%H:%ct GOWORK 64/bin/go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE fips140/edwards2rev-parse 5260621/b006/sym--show-toplevel 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE .cfg GOINSECURE g/x/crypto/interconfig GOMODCACHE ache/go/1.25.8/xtest@example.com (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name l_test.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 .cfg .cfg GOINSECURE g/x/crypto/chachconfig ache/go/1.25.8/xuser.name ache/go/1.25.8/xTest User (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE sgM1d_TR1DWb env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE x_amd64/vet env 3590363922 @v1.19.2/ast/ast.go x_amd64/vet tion_pins.json..git GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 5260621/b007/abirun ache/go/1.25.8/xlist 64/pkg/tool/linu--json env -json aqNl/Sak5XWYSYfQ100 x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build3829275009/b404/cli.test /tmp/go-build3829275009/b404/cli.test -test.testlogfile=/tmp/go-build3829275009/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x^remote\..*\.gh-resolved$ /usr/bin/git OnlyCompiledOutpgit -trimpath ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git ithub/workflows -buildtags 9275009/b426=> 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, .object.type] | @tsv g_.a 9275009/b034/vet.cfg k -I /tmp/go-build253-1 -I ache/go/1.25.8/x64/pkg/tool/linuTest User sRem�� JyM6o-Ioz 9275009/b121/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p internal/poll -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json eutil.go x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env g_.a GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env Gitmaster_branch1459598810/001' Gitmaster_branch1459598810/001' x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env lGitmaster_branch1459598810/001' lGitmaster_branch1459598810/001' x_amd64/vet GOINSECURE bug GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv (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, .object.type] | @tsv se 9275009/b003/vet.cfg .cfg -p internal/cpu -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet 5260�� sRemoteWithRealGitbranch_with_hyphen1290328103/001 sRemoteWithRealGitbranch_with_hyphen1290328103/002/work ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p internal/filepatrun -lang=go1.25 ache/go/1.25.8/x12345 (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE b/gh-aw/pkg/giturev-parse GOMODCACHE eutil.test 8292�� se 9275009/b046/vet.cfg Name,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle -I /tmp/go-build253rev-parse -I ache/go/1.25.8/x64/pkg/tool/linu-trimpath (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE json emclr_wasm.s x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD reempt_wasm.s x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile estl�� g_.a pkg/mod/github.com/goccy/go-yaml@v1.19.2/context.go 64/pkg/tool/linux_amd64/compile -p github.com/segmeapi -lang=go1.17 64/pkg/tool/linurepos/{owner}/{repo}/actions/runs/12346/artifacts (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch 812058053/custom/workflows 9275009/b096/vet.cfg .cfg gh-aw ./cmd/gh-aw 64/bin/go ache/go/1.25.8/x64/pkg/tool/linu-tests (http block)
  • invalid.example.invalid
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git e/git init�� ndor/bin/git git ode_modules/.bin/git =receive test@example.com--git-dir=/tmp/bare-incremental-S0qzlY /git (dns block)

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

Copilot AI changed the title [WIP] Add gen_ai.request.model to conclusion span attributes add gen_ai.request.model to conclusion span attributes Apr 27, 2026
Copilot AI requested a review from pelikhan April 27, 2026 14:21
@pelikhan pelikhan marked this pull request as ready for review April 27, 2026 14:22
Copilot AI review requested due to automatic review settings April 27, 2026 14:22
@pelikhan pelikhan merged commit 049cab5 into main Apr 27, 2026
9 checks passed
@pelikhan pelikhan deleted the copilot/otel-advisor-add-gen-ai-request-model branch April 27, 2026 14:22
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 model name (gen_ai.request.model) is attached to the primary job conclusion span (gh-aw.*.conclusion), enabling model-level grouping/filtering across observability backends for both agent and non-agent jobs.

Changes:

  • Add gen_ai.request.model to the main conclusion span attributes in sendJobConclusionSpan when aw_info.json provides a model.
  • Add tests asserting the model attribute is present/absent on the conclusion span depending on aw_info.json.
Show a summary per file
File Description
actions/setup/js/send_otlp_span.cjs Adds gen_ai.request.model to the conclusion span attributes when awInfo.model is set.
actions/setup/js/send_otlp_span.test.cjs Adds coverage to ensure the conclusion span includes/omits gen_ai.request.model appropriately.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment on lines +1906 to +1907
await sendJobConclusionSpan("gh-aw.job.conclusion");

Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

This test relies on the real filesystem state for /tmp/gh-aw/aw_info.json. If that file happens to exist on a developer machine (or is created by another test/process), the test can become flaky because sendJobConclusionSpan will read it and may include gen_ai.request.model. To make the test hermetic, stub fs.readFileSync for /tmp/gh-aw/aw_info.json to throw ENOENT (or return JSON without a model) and restore the spy afterward, consistent with the surrounding tests.

Suggested change
await sendJobConclusionSpan("gh-aw.job.conclusion");
const readFileSpy = vi.spyOn(fs, "readFileSync").mockImplementation(filePath => {
if (filePath === "/tmp/gh-aw/aw_info.json") {
throw Object.assign(new Error("ENOENT"), { code: "ENOENT" });
}
throw Object.assign(new Error("ENOENT"), { code: "ENOENT" });
});
try {
await sendJobConclusionSpan("gh-aw.job.conclusion");
} finally {
readFileSpy.mockRestore();
}

Copilot uses AI. Check for mistakes.
@github-actions github-actions Bot mentioned this pull request Apr 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 75/100

⚠️ Acceptable — minor note on test-to-production ratio.

Metric Value
New/modified tests analyzed 2
✅ Design tests (behavioral contracts) 2 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 1 (50%)
Duplicate test clusters 0
Test inflation detected Yes (38 test lines added : 1 production line)
🚨 Coding-guideline violations None

Test Classification Details

Test File Classification Issues Detected
includes gen_ai.request.model on the conclusion span when model is set in aw_info.json actions/setup/js/send_otlp_span.test.cjs:1877 ✅ Design Happy-path only; mocks are external I/O (acceptable)
omits gen_ai.request.model from the conclusion span when model is absent in aw_info.json actions/setup/js/send_otlp_span.test.cjs:1900 ✅ Design Covers the negative/absent case — good edge-case coverage

Notes

Test Inflation Ratio

The test file grew by 38 lines while the production file grew by 1 line (38:1 ratio, threshold 2:1). This triggers the inflation penalty per rubric. However, the ratio is inflated by context — the 1-line production change (if (model) attributes.push(...)) reuses logic already established elsewhere; 2 integration-style tests with full HTTP-mock scaffolding are proportionate for verifying an observable OTLP attribute. No remediation needed; consider this a scoring artefact rather than a real concern.

Mocking Strategy

Both tests use vi.spyOn(fs, "readFileSync") and vi.stubGlobal("fetch", ...). These mock exclusively external I/O and network — acceptable targets in this codebase. Business logic is exercised through the real sendJobConclusionSpan function.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 0 tests
  • 🟨 JavaScript (*.test.cjs): 2 tests (vitest)

Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). Both tests verify observable OTLP span attributes — exactly the behavioral contract introduced by this PR. The negative case (model absent → attribute omitted) adds solid edge-case coverage.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.

References: §25000638661

🧪 Test quality analysis by Test Quality Sentinel · ● 675K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: 75/100. Test quality is acceptable — 0% of new tests are implementation tests (threshold: 30%). Both tests verify observable OTLP span attributes (presence and absence of gen_ai.request.model on the conclusion span), covering the behavioral contract introduced by this PR.

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] add gen_ai.request.model to conclusion span attributes

3 participants