Add GitHub agentic workflow (gh-aw) instrumentation#3298
Merged
plengauer merged 3 commits intoApr 10, 2026
Conversation
Owner
|
Hello, thanks for contributing for the first time! |
Agent-Logs-Url: https://github.com/plengauer/Thoth/sessions/aa0e8b2e-b947-4903-8e31-dbb9770a4313 Co-authored-by: plengauer <100447901+plengauer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add GitHub agentic workflow instrumentation
Add GitHub agentic workflow (gh-aw) instrumentation
Apr 3, 2026
plengauer
requested changes
Apr 3, 2026
…re exit Agent-Logs-Url: https://github.com/plengauer/Thoth/sessions/452d71c2-5b0b-4140-b0c1-5758679847ca Co-authored-by: plengauer <100447901+plengauer@users.noreply.github.com>
plengauer
approved these changes
Apr 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds post-action instrumentation for the github/gh-aw/actions/setup JavaScript action by rewriting generated shell scripts so they source otel.sh, ensuring OpenTelemetry instrumentation is applied even when scripts are invoked via absolute paths.
Changes:
- Detect successful completion of
github/gh-aw/actions/setupand locate the action’s configuredINPUT_DESTINATION. - Recursively find
*.shfiles underINPUT_DESTINATIONand insert. otel.shafter common shebangs usingsed -i.
moflwi
approved these changes
Apr 10, 2026
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.
github/gh-aw/actions/setupis a JavaScript action that writes shell scripts to a configurabledestinationdirectory. Those scripts are subsequently invoked via absolute paths, bypassing the normal shell instrumentation pipeline.Changes
actions/instrument/job/decorate_action.sh: After any JavaScript action completes successfully, detect if it wasgithub/gh-aw/actions/setup(viaGITHUB_ACTION_REPOSITORY+GITHUB_ACTION_PATHsuffix check) and inject. otel.shafter the shebang in every.shfile found recursively underINPUT_DESTINATIONPre-instrumenting the files at setup time means they are self-instrumenting regardless of how they are later invoked (absolute path, relative path, sourced). The
|| true/2>/dev/nullguards ensure the originalexit_codeis never affected. Follows the same sed pattern used by the copilot and CodeQL instrumentation modules.