Repository navigation
docs(frameworks): TanStack AI tracing (TH-8238) - #1013
Merged
Merged
Conversation
Recipe page for TanStack AI (@tanstack/ai 0.69.0, also tested on 0.64.0): TanStack's own otelMiddleware with a tracer from @traceai/fi-core, wrapped by the tracing.mjs from future-agi/traceAI#212 (span kinds, tokens counted once, error text and stack traces out by default, session from threadId, a new trace per chat). Covers install and pins, a traced route, what is captured, privacy default and the captureContent opt-in, apps that already run OpenTelemetry, limitations and troubleshooting. navigation.ts is not edited; suggested nav: Integrations > Frameworks, "TanStack AI". Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 17, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…0.69.0 (TH-8238) - route.mjs now defines a get_weather server tool with toolDefinition() and passes tools to chat(), so step 5's tool question produces the execute_tool span the table describes (same tool as the traceAI example). The model is read from OPENAI_MODEL, defaulting to gpt-4o-mini. - Replace the stale "Pre-1.0 upstream" note: @tanstack/ai and @tanstack/ai-openai 1.0.0 shipped on 2026-10-22; list what changed in otelMiddleware and usage-attributes and keep the recipe pinned to 0.69.0. - Replace the "Not tested" row and wording with the verified scope, record the 2026-10-29 run (fresh install of the step 1 pins, hosted api.futureagi.com accepted all four spans), and drop telemetry.sdk.* from the resource list (not present in the exported resource). - Add the page to the integration catalog. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Code <[email protected]>
Co-Authored-By: Claude Code <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New page
src/pages/docs/integrations/frameworks/tanstack-ai.mdx: trace TanStack AI (@tanstack/ai) server-sidechat()calls with TanStack's ownotelMiddlewareand a tracer provider from@traceai/fi-core. No traceAI package; the recipe file (tracing.mjs) is embedded in the page and is the same file as the runnable example in future-agi/traceAI#212 (typescript/examples/tanstack-ai).Sections: install (with the SDK and adapter pins), environment, the recipe file, a traced route (abort wiring, bounded flush), run and check (span table, error shapes), what is captured (default vs
captureContent: true), privacy (metadata only by default; error text and stack traces replaced byerror.type; opt-in withredact; opaque session ids), apps that already run OpenTelemetry (new trace per chat,joinActiveTrace), how it behaves, limitations, troubleshooting, and how it differs from the Vercel AI SDK integration, the OpenAI instrumentor and the OpenInference TanStack middleware.Tested
@tanstack/ai0.69.0 (npm latest, 2026-10-13) with@tanstack/ai-openai0.30.0,@tanstack/openai-base0.14.0, OpenTelemetry SDK 2.12.0; also the earlier set@tanstack/ai0.64.0 /ai-openai0.26.0 / SDK 2.11.0.@traceai/fi-core1.0.0. Node 22.18.0 and 26.8.1.gpt-4o-mini(provideropenai, response modelgpt-4o-mini-2024-07-18, per-call cost computed,404unknown model → ERRORmodel_not_found). Spend about $0.0001.Build
docs_build.sh: BUILD_EXIT=0; audit-links: 0 broken nav links, 0 broken content links.Navigation
src/lib/navigation.tsis not edited. Suggested nav: group Integrations → Frameworks, title "TanStack AI" (page/docs/integrations/frameworks/tanstack-ai), next to the other framework recipes.Depends on
future-agi/traceAI#212 (head
f2295cb): the page'stracing.mjsand the example the "Source" row links to. The link resolves once #212 is merged and released tomain.Limitations stated on the page
chat({ stream: false })loses failed traces (0.64.0 to 0.69.0).api.futureagi.com, other adapters, media activities, browser and edge runtimes.Linear: TH-8238.
🤖 Generated with Claude Code