feat(otel): add deployment.environment to setup span resource attributes#24747
Merged
feat(otel): add deployment.environment to setup span resource attributes#24747
Conversation
7 tasks
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/89449ede-1d62-4bb5-a509-8daa797fac73 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add deployment.environment to setup span resource attributes
feat(otel): add deployment.environment to setup span resource attributes
Apr 5, 2026
pelikhan
approved these changes
Apr 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the missing deployment.environment OpenTelemetry resource attribute to sendJobSetupSpan so setup spans can be reliably queried/grouped by environment the same way conclusion spans already are.
Changes:
- Derive
stagedfromaw_info.jsoninsendJobSetupSpanand emitdeployment.environmentasstaging/production. - Add unit tests covering
aw_info.jsonabsent,staged=true, andstaged=falsefor setup spans.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/send_otlp_span.cjs | Adds deployment.environment resource attribute to setup span payloads based on awInfo.staged. |
| actions/setup/js/send_otlp_span.test.cjs | Adds test coverage ensuring deployment.environment is set correctly for setup spans across staged/unstaged/missing file cases. |
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: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sendJobSetupSpanwas missing thedeployment.environmentresource attribute thatsendJobConclusionSpanalready sets — causing environment-scoped OTel queries to silently omit setup spans and breaking trace continuity in any backend that filters or groups by environment.Changes
send_otlp_span.cjs: InsendJobSetupSpan, extractstagedfromawInfoand pushdeployment.environmenttoresourceAttributes, mirroring the conclusion span behavior:When
aw_info.jsonis absent (e.g., activation job's own setup span),stageddefaults tofalse→"production", matching the conclusion span's fallback behavior.send_otlp_span.test.cjs: Added astaged / deployment.environmentdescribe block undersendJobSetupSpanwith three cases covering absent file,staged=true, andstaged=false— mirroring the equivalent block already present forsendJobConclusionSpan.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/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js git _modules/.bin/giHEAD forks.js ls-r�� origin refs/heads/fallback-branch /git -bare-x8Loow main 1/x64/lib/node_m01d9c87d8f5288c8ab13e22cb7ff1058156537e9..HEAD git(http block)invalid.example.invalid/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git comm�� -m Initial commit k/_temp/uv-python-dir/git ranch main cal/bin/git git conf�� user.email test@test.com /git -b feature-branch /git /usr/lib/git-core/git(dns block)If you need me to access, download, or install something from one of these locations, you can either: