Commit e475334
committed
Fix: Enter Langfuse span context to properly attach child spans
The Langfuse session span was created with start_as_current_span() but
never entered, causing child generations and tool spans to be orphaned.
Now properly using __enter__()/__exit__() to manage span lifecycle.
This fixes the missing Langfuse SDK traces in the UI.1 parent 76966c8 commit e475334
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
464 | 466 | | |
465 | 467 | | |
466 | 468 | | |
| 469 | + | |
| 470 | + | |
467 | 471 | | |
468 | 472 | | |
469 | 473 | | |
| |||
527 | 531 | | |
528 | 532 | | |
529 | 533 | | |
| 534 | + | |
| 535 | + | |
530 | 536 | | |
531 | 537 | | |
532 | 538 | | |
| |||
0 commit comments