Repository navigation
feat: trace E2B sandbox and code execution - #2602
Open
KarthikS (karthiksenv) wants to merge 1 commit into
Open
KarthikS (karthiksenv) wants to merge 1 commit into
KarthikS (karthiksenv) wants to merge 1 commit into
Conversation
KarthikS (karthiksenv)
marked this pull request as ready for review
October 11, 2026 13:59
This branch has not been deployed
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.
E2B sandbox operations currently produce no Braintrust spans. Add standard Orchestrion configs and a channel plugin for
Sandbox.create(),sandbox.commands.run(), andsandbox.runCode()in the E2B 2.x SDKs, including CommonJS and ES module builds.The integration preserves SDK results, background command handles, callbacks, and parent spans. It captures execution errors even when
runCode()resolves successfully, selects operation fields instead of serializing credential-bearing options/instances, and supports thee2bintegration opt-out. Includes usage documentation and a changeset.Fixes #2480.
Validation
BraintrustPlugin, and the instrumentation registry.e2b@2.9.0and@e2b/code-interpreter@2.2.0tested in CommonJS and ES module formats.braintrust/hook.mjssmoke checks pass for both module formats; bothe2band@e2b/code-interpreterenvironment opt-outs suppress tracing.span-origin.ts).Reproduce the committed regression tests from
js/with:pnpm exec vitest run tests/auto-instrumentations/e2b.test.ts src/instrumentation/braintrust-plugin.test.ts src/instrumentation/registry.test.ts pnpm run check:typings pnpm run buildTest scope
These are hermetic tests against published SDK implementations, using E2B's debug creation path and stubbed provider I/O. No live E2B sandbox was provisioned and no provider replay cassette is included; live-cloud verification remains outstanding because no E2B credential was configured.