Commit 84558a9
fix(tracing): import TracingActivityName only after the in_activity() guard
The enum import sat above the in_activity() check, so it ran on every start_span
-- including the pure-sync ACP path that never touches Temporal. That pulled the
whole temporal activities module graph into workflow-less processes, made the
docstring's "inside an activity" safety justification untrue for the path
actually taken, and meant a broken import would silently return False (disabling
dispatch discrimination) even on the sync path. Move it below the guard: sync
never runs it, and inside an activity the graph is loaded so the lazy import
stays safe.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 4a8b7e3 commit 84558a9
1 file changed
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
136 | | - | |
137 | | - | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments