Emit synthetic OTel exception events for failure conclusions without readable agent output#31334
Merged
Merged
Conversation
7 tasks
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Emit synthetic exception event for agent failures
Emit synthetic OTel exception events for failure conclusions without readable agent output
May 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves OTLP conclusion-span observability by emitting a synthetic OpenTelemetry exception event when the agent concludes non-OK (including failure) but /tmp/gh-aw/agent_output.json is missing or unreadable, ensuring trace backends have a queryable failure signal even without agent output.
Changes:
- Extend synthetic-exception emission in
sendJobConclusionSpanto trigger for any non-OK agent conclusion when there is no readableagent_output.json(addsgh-aw.AgentFailedfor generic failures). - Add/adjust focused tests to assert synthetic exception events for missing and unreadable
agent_output.jsononfailure.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/send_otlp_span.cjs | Emit synthetic exception events for all non-OK conclusions when agent output is absent/unreadable (including failure). |
| actions/setup/js/send_otlp_span.test.cjs | Add assertions covering synthetic failure exceptions for missing/unreadable agent_output.json. |
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.
✨ Enhancement
What does this improve?
Agent conclusion spans already marked
failureasSTATUS_CODE_ERROR, but when/tmp/gh-aw/agent_output.jsonwas missing or unreadable they emitted noexceptionevent. That left trace backends with a red span but no diagnosable failure signal to surface, group, or alert on.Why is this valuable?
This keeps generic agent crashes aligned with the existing
timed_out/cancelledsynthetic-exception behavior, so failure traces remain queryable even when the agent never produces readable output.Conclusion span behavior
send_otlp_span.cjsto cover all non-OK agent conclusions with unreadable output, includingfailure.exception.type = gh-aw.AgentFailedexception.message = agent failureFailure-path coverage
agent_output.jsonagent_output.jsonExample