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
- LangChain: `onChainStart` callback in `packages/core/src/tracing/langchain/index.ts`
48
48
49
49
---
50
50
51
51
## Streaming vs Non-Streaming
52
52
53
53
**Non-streaming:** Use `startSpan()`, set attributes immediately from response
54
54
55
-
**Streaming:** Use `startSpanManual()` with this pattern:
55
+
**Streaming:** Use `startSpanManual()` and prefer event listeners/hooks when available (like Anthropic's `stream.on()`). If not available, use async generator pattern:
- Patch runnable methods to add handler automatically
206
-
- **Important:** Disable underlying AI provider wrapping (langchain/instrumentation.ts:103-105)
208
+
- **Important:** Disable underlying AI provider wrapping (see `instrumentLangchain` in `packages/node/src/integrations/tracing/langchain/instrumentation.ts`)
0 commit comments