Emit engine metadata on setup spans by injecting GH_AW_INFO_ENGINE_ID into Setup Scripts env#32634
Merged
Merged
Conversation
8 tasks
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve OTel instrumentation to emit engine ID and system attributes
Emit engine metadata on setup spans by injecting May 16, 2026
GH_AW_INFO_ENGINE_ID into Setup Scripts env
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request ensures gh-aw.<job>.setup spans can emit gh-aw.engine.id / gen_ai.system by making the engine ID available during the setup step (before aw_info.json is generated).
Changes:
- Inject
GH_AW_INFO_ENGINE_IDinto theSetup Scriptsstep env in both action and script setup paths, using precedenceEngineConfig.ID→AI. - Add unit tests covering engine ID env injection for action mode (from
EngineConfig.ID) and script mode (fromAI). - Update wasm compile golden fixtures to include the new setup-step env line.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/compiler_yaml_step_generation.go | Adds engine ID resolution and injects GH_AW_INFO_ENGINE_ID into setup-step env for script + action modes. |
| pkg/workflow/setup_step_version_test.go | Adds focused tests asserting GH_AW_INFO_ENGINE_ID is present in generated setup steps. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden | Golden update to include GH_AW_INFO_ENGINE_ID on setup steps. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden | Golden update to include GH_AW_INFO_ENGINE_ID on setup steps. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/playwright-cli-mode.golden | Golden update to include GH_AW_INFO_ENGINE_ID on setup steps. |
| pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden | Golden update to include GH_AW_INFO_ENGINE_ID on setup steps. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 6/6 changed files
- Comments generated: 0
Collaborator
|
@copilot merge main and recompile |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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.
gh-aw.<job>.setupspans were missinggh-aw.engine.id/gen_ai.systembecause setup runs beforegenerate_aw_info, so/tmp/gh-aw/aw_info.jsonis not yet available at setup span emission time. This prevented direct setup-latency slicing by engine from a single span.Compiler change: make engine ID available at setup time
GH_AW_INFO_ENGINE_IDinSetup Scriptsenv.run: bash .../setup.sh)uses: .../actions/setup)engine-config.idfirstaiTargeted coverage for setup-step env generation
GH_AW_INFO_ENGINE_IDis present in generated setup steps:EngineConfig.IDAIin script modeGolden updates
This ensures
sendJobSetupSpancan resolve engine ID during setup and emit bothgh-aw.engine.idandgen_ai.systemon the setup span.