Repository navigation
OTel: emit gen_ai.system on setup and conclusion spans - #32340
Merged
pelikhan merged 2 commits intoMay 15, 2026
Merged
Conversation
1 of 8 tasks
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve OTel instrumentation to emit gen_ai.system on setup and conclusion spans
OTel: emit May 15, 2026
gen_ai.system on setup and conclusion spans
pelikhan
marked this pull request as ready for review
May 15, 2026 12:03
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends OTel GenAI provider attribution so setup and conclusion lifecycle spans include gen_ai.system, not just dedicated agent spans.
Changes:
- Adds
gen_ai.systemto setup spans when an engine ID is available. - Adds
gen_ai.systemto conclusion spans using the existing engine-to-provider mapping. - Updates unit assertions for mapped and omitted provider attributes.
Show a summary per file
| File | Description |
|---|---|
actions/setup/js/send_otlp_span.cjs |
Adds provider attribution to setup and conclusion span attributes. |
actions/setup/js/send_otlp_span.test.cjs |
Expands tests to assert gen_ai.system behavior on setup and conclusion spans. |
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
+1424
to
+1427
| if (engineId) { | ||
| const genAiSystem = ENGINE_TO_SYSTEM_MAP[engineId] || engineId; | ||
| attributes.push(buildAttr("gen_ai.system", genAiSystem)); | ||
| attributes.push(buildAttr("gh-aw.engine.id", engineId)); |
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.
✨ Enhancement
gen_ai.systemwas only emitted ongh-aw.<job>.agentspans, which prevented end-to-end lifecycle analysis by provider in OTel-native GenAI dashboards. This change propagates the same provider identity to setup and conclusion spans so run-level latency/failure queries work across the full job lifecycle.What does this improve?
gen_ai.systemto:gh-aw.<job>.setupgh-aw.<job>.conclusiongh-aw.engine.idbehavior unchanged.Why is this valuable?
Implementation approach:
ENGINE_TO_SYSTEM_MAPmapping insend_otlp_span.cjs.engineIdwhen unknownsend_otlp_span.test.cjsto cover:gen_ai.systemcorrectlygen_ai.systemcorrectlyclaude -> anthropic,copilot -> github_models)