Add gh-aw.staged and deployment.environment to OTLP conclusion spans#24711
Merged
Add gh-aw.staged and deployment.environment to OTLP conclusion spans#24711
Conversation
6 tasks
Reads awInfo.staged in sendJobConclusionSpan and propagates it as:
- gh-aw.staged (boolean) in span attributes
- deployment.environment ("staging"/"production") in resource attributes
Adds tests for both staged=true and staged=false cases.
Fixes #<issue>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f78bba75-eeb5-4ffa-abe4-0c55ae22c8f6
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add staged flag to OTLP spans in job conclusion
Add gh-aw.staged and deployment.environment to OTLP conclusion spans
Apr 5, 2026
Closed
pelikhan
approved these changes
Apr 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds explicit “staged vs production” signals to OTLP job conclusion spans so observability backends can separate dry-run noise from real runs.
Changes:
- Read
awInfo.stagedinto a boolean and emitgh-aw.stagedspan attribute. - Emit
deployment.environmentresource attribute as"staging"/"production"based onstaged. - Add unit tests covering default behavior and both
awInfo.stagedboolean cases.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/send_otlp_span.cjs | Adds gh-aw.staged span attribute and deployment.environment resource attribute in sendJobConclusionSpan. |
| actions/setup/js/send_otlp_span.test.cjs | Adds test coverage validating staged and environment attributes across staged unset/true/false. |
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.
awInfo.stagedwas read nowhere insendJobConclusionSpan, making it impossible for OTLP backends to distinguish dry-run executions from production runs — polluting failure metrics and firing alerts on staged noise.Changes
send_otlp_span.cjs—sendJobConclusionSpan:awInfo.staged === trueinto astagedbooleangh-aw.staged(bool) to spanattributesdeployment.environment("staging"|"production") toresourceAttributes, following OTel semantic conventionssend_otlp_span.test.cjs— newdescribe("staged / deployment.environment")covering:stagedabsent →gh-aw.staged=false,deployment.environment="production"awInfo.staged=true→gh-aw.staged=true,deployment.environment="staging"awInfo.staged=false→gh-aw.staged=false,deployment.environment="production"