feat: Add Mistral example and adopt Sentry v11 RC - #28
Merged
Merged
Conversation
This was referenced Sep 16, 2026
sergical
marked this pull request as ready for review
September 16, 2026 18:42
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.
Adds a TypeScript order-support assistant that calls Mistral directly. The default app uses native SDK instrumentation for model spans. Optional helpers group each turn and trace local order lookups, including a failure-and-retry exercise. The native integration is included in the pinned Sentry
11.0.0-rc.0release candidate.The Eve, Flue, and storefront examples also use this RC. Eve and Flue explicitly enable the OpenTelemetry bridge; the examples use v11 data-collection controls, streamed-span callbacks, and Next.js configuration. The storefront requires Node.js 22.12 or later. Start review with
mistral-support/, then the existing examples' SDK configuration.All five examples passed type and lint checks; Eve and storefront also passed production builds. Mistral checks covered streaming, follow-up history, tool failure, retry, privacy controls, and error-to-trace linkage using the real RC. Live runs used Mistral SDK 2.7.0 through OpenRouter with
mistralai/mistral-small-2603. Sentry's stored inputs, outputs, tool definitions, and token counts matched the emitted model spans. The automatic run produced seven native model spans; the optional run added four agent and four tool execution spans, including the expected failed lookup and a successful retry. A separate privacy run confirmed that disabled AI content was absent from stored spans. The actual terminal commands also passed. Earlier live AI Gateway runs provided additional ingestion evidence.These provider checks used temporary test copies with compatible endpoint, model, and tool-choice settings. The checked-in example calls Mistral directly; that endpoint was not exercised and remains an accepted assumption for this review. Full live runs of the other examples' external integrations are still pending.
One SDK issue remains for follow-up: completed streamed replies return HTTP 200 and successful native AI spans, but their HTTP child spans are marked as errors. Mistral's SSE reader cancels the finished response with
"done", and Sentry's fetch instrumentation treats that cleanup as an error. The example does not suppress this behavior. Keep this PR in draft while reviewing that issue and the remaining example checks; update the RC pin when v11 becomes stable.The screenshots below show the automatic conversation in the Transcript tab and the optional local lookup result. The captures use the verified OpenRouter runs. The illustrated recipes are in https://github.com/getsentry/static-sites/pull/4808 and mistralai/cookbook#408.
Browser screenshots
The automatic setup shows the Transcript tab with the model’s lookup_order request, arguments, timing, and tokens open in the sidebar.
Optional application instrumentation adds local tool duration and returned data.