Skip to content

Log Activity Panic at Workflow Caller Level#2229

Open
brucearctor wants to merge 1 commit intotemporalio:masterfrom
brucearctor:fix-issue-2204
Open

Log Activity Panic at Workflow Caller Level#2229
brucearctor wants to merge 1 commit intotemporalio:masterfrom
brucearctor:fix-issue-2204

Conversation

@brucearctor
Copy link

Log Activity Panic at Workflow Caller Level

Fixes #2204.

  • Fix: When an activity panics, the panic trace is now correctly logged at the workflow execution level. Previously, an ApplicationError with a PanicError structure was created securely, but the sdk-go package failed to intercept and log the panic traceback at the WorkflowTaskHandler level.
  • Mechanism: Modified internal_event_handlers.go in handleActivityTaskFailed and handleLocalActivityMarker. The code now explicitly checks if the decoded error wraps a PanicError. If it does, a native logger.Error logs the associated fields (tagPanicError and tagPanicStack).
  • Testing: Added new unit test TestActivityTask_ActivityPanics to internal/internal_task_handlers_test.go and verified against the full sdk-go test suite to check for correctness and absence of regressions.
@brucearctor brucearctor requested a review from a team as a code owner March 15, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant