Commit 061834c
fix(opentelemetry): Fix reversed fallback logic in getTraceData
The fallback condition in getTraceData was reversed, making the scope
context path unreachable dead code. api.trace.setSpan() always returns
a truthy Context object, so placing it first in the OR expression
meant the fallback (scope && getContextFromScope(scope)) could never
be evaluated.
This fix restores the correct order: check scope context first, then
fall back to setSpan if the scope doesn't exist.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent aa83a81 commit 061834c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments