fix(temporal): pass Exception directly to span.log(error=...)#611
Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit intoJul 21, 2026
Merged
Conversation
The integrations spec requires passing the Exception instance to span.log so Braintrust can extract type + traceback. Stringifying the exception in the activity and workflow error paths dropped that structure. Also trim redundant explanatory comments and docstrings that only restated the code. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Abhijeet Prasad (AbhiPrasad)
approved these changes
Jul 21, 2026
Abhijeet Prasad (AbhiPrasad)
enabled auto-merge (squash)
July 21, 2026 19:04
Abhijeet Prasad (AbhiPrasad)
deleted the
fix/temporal-error-logging-spec-compliance
branch
July 21, 2026 19:13
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.
Summary
Exceptiontospan.log(error=...)so Braintrust can extract exception type + traceback. The activity and workflow error paths were callingstr(e)first, losing that structure.Test plan
cd py && nox -s "test_temporal(latest)" -- -k "TestHeaderSerialization or TestWorkflowSpanContext or test_contrib_temporal_compat"— 9/9 passcd py && nox -s "test_temporal(latest)" -- -k "test_plugin_basic_workflow_tracing or test_plugin_activity_retry_tracing"— 2/2 pass (retry test exercises the newerror=epath against a real Temporal test server)🤖 Generated with Claude Code
Created by abhijeet
Slack thread