You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5decbec
Browse filesBrowse the repository at this point in the historyBrowse files
feat(tracing): per-step obs wrappers inside business Temporal activities (1:1)
Previously _begin_obs skipped the obs wrapper for ANY Temporal activity (Option
A) and only stamped the ambient RunActivity span, so all business spans in a turn
collapsed onto ONE obs span (52:1). But inside a *business* activity, start_span
and end_span run in the SAME process, so a wrapper is safe there. Option A is
only required for the SDK's own dispatched START_SPAN/END_SPAN activities (the
in_temporal_workflow path), where start and end are separate activities on
possibly different workers.
Discriminate on activity type: _in_tracing_dispatch_activity() is true only for
the "start-span"/"end-span" activities. For everything else (sync, or a business
activity) open a real per-step wrapper — it nests under the interceptor's ambient
RunActivity span and closes in-process, giving each business span its own obs
span (1:1), matching the sync path. The bounded _OBS_HANDLES registry backstops
any mis-discrimination.
0 commit comments