Repository navigation
Commit d871239
committed
docs(examples): state where TanStack AI spans can still be lost
Installed review N2: the README gave the 2 s flush bound but not its
consequences.
- Serverless: flushTraces() stops waiting at the bound; it does not stop
the export (tracing.mjs flushTraces leaves `flushed` running). Spans
still pending then are lost if the runtime freezes or exits after the
response. The `timeoutMs` option was not documented.
- Long-lived servers: register()'s default SimpleSpanProcessor
(@traceai/fi-core 1.0.0 otel.js 356-358) exports each span in its own
OTLP request. The OTLP/HTTP exporter (otlp-exporter-base 0.202.0
shared-configuration.js 54-55) allows 30 exports in flight with a 10 s
timeout each and rejects the rest with "Concurrent export limit
reached" (otlp-export-delegate.js 43-46), so with a slow collector
spans drop from about 8 concurrent chats of 4 spans.
The Notes section now says both and documents
flushTraces(tracerProvider, { timeoutMs }).
Documentation only. The slow-collector concurrency case is described,
not tested (no fixture for 10 concurrent routes against a delaying
collector).
approved: Nikhil 2026-10-03 blanket
Refs: TH-82381 parent 9bf9cf8 commit d871239
1 file changed
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
198 | 199 | | |
199 | | - | |
200 | | - | |
201 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
202 | 211 | | |
203 | 212 | | |
204 | 213 | | |
| |||
0 commit comments