Skip to content

Commit 35f127b

Browse files
NiteshDhanpalclaude
andcommitted
docs(tracing): re-home the follow-up TODOs orphaned by removing _in_temporal_activity
Deleting _in_temporal_activity earlier dropped the TODO it carried. This PR does item (a) of it (the named per-step wrapper); the other two are still open, so re-home them on _begin_obs where the per-step wrapper decision now lives: (1) TurnTrace RETRY/ASYNC roll-up -- retried turns currently surface as N per-attempt span sets, not one PRIMARY + N RETRY view. (2) multi-replica bounded-_OBS_HANDLES + obs_trace_id-resolves-to-turn check. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d9717ef commit 35f127b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/agentex/lib/core/tracing/trace.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,15 @@ def _begin_obs(
195195
if _in_tracing_dispatch_activity():
196196
tag_ambient_obs_span(business_span_id=span_id, business_trace_id=trace_id, prefer_otel=True)
197197
return None, obs_correlation(prefer_otel=True)
198+
# TODO(obs-followup): two items formerly tracked on the (now-deleted)
199+
# _in_temporal_activity docstring, still open after this change:
200+
# (1) TurnTrace RETRY/ASYNC roll-up. A retried business activity now emits a
201+
# full per-step wrapper set PER ATTEMPT, each nested under that attempt's
202+
# RunActivity. Each attempt correlates to the turn on its own, but they
203+
# are not yet rolled up, so a retried turn surfaces as N per-attempt span
204+
# sets rather than one PRIMARY + N RETRY view.
205+
# (2) On a multi-replica worker fleet, assert _OBS_HANDLES stays bounded (no
206+
# leak / OOM) and that obs_trace_id resolves to the turn trace.
198207
prefer_otel = _in_temporal_activity()
199208
handle = open_obs_span(
200209
name, business_span_id=span_id, business_trace_id=trace_id, prefer_otel=prefer_otel

0 commit comments

Comments
 (0)