Repository navigation
Test mistral-support spans and replace exact pins with minimum versions - #32
Merged
Merged
Conversation
The example pinned @sentry/node 11.0.0 and @mistralai/mistralai 2.7.0. Sentry traces Mistral 3.x only from 11.11.0, so upgrading Mistral alone silently removed every model span. - package.json sets minimums (^11.11.0, ^3.0.0); the lockfile keeps the tested combination. - spans.test.ts runs the example against a mocked Mistral API and fails when the model, agent or tool spans disappear. - CI runs the test on changes and weekly against the latest releases. - Dependabot refreshes the lockfile weekly. - execute_tool sets gen_ai.agent.name, as the agent tracing docs advise. Co-authored-by: Claude <[email protected]>
This was referenced Nov 18, 2026
Member
Author
|
Related drafts:
|
Without these checks, an SDK change that dropped the model input or tool definitions from the spans would still pass. Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
sergical
marked this pull request as ready for review
November 18, 2026 23:49
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a820e71. Configure here.
| run: | | ||
| if [ -z "$(gh issue list --state open --search "in:title \"$TITLE\"" --json number --jq '.[].number')" ]; then | ||
| gh issue create --title "$TITLE" --label sentry-sdk --body "The weekly check against the latest versions failed: $RUN_URL" | ||
| fi |
There was a problem hiding this comment.
Issue create fails without label
Medium Severity
The weekly latest job files a GitHub issue with --label sentry-sdk, but nothing in this repository defines or creates that label. gh issue create fails when a requested label is missing, so a scheduled SDK-breakage run would stay failed without opening the issue that job exists to file.
Reviewed by Cursor Bugbot for commit a820e71. Configure here.
sergical
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Nov 19, 2026
## DESCRIBE YOUR PR The Mistral integration page lists `@mistralai/mistralai` `>=2.0.0 <3`. The SDK has accepted `>=2.0.0 <4` since 11.11.0 (getsentry/sentry-javascript#25827; `versionRange` in `packages/server-utils/src/orchestrion/config/mistral.ts`). Readers on Mistral 3.x are told they are unsupported. The page also did not say that 3.x needs 11.11.0, while its header says only "Requires SDK version 11.0.0". Evidence: with Mistral 3.5.0, `@sentry/node` 11.11.0 and 11.13.0 produce both `gen_ai.chat` spans, and 11.0.0 produces none. See the span test in getsentry/sentry-agent-tracing-examples#32. ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) Co-authored-by: Claude <[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.


The example pinned
@sentry/node11.0.0 and@mistralai/mistralai2.7.0. Sentry traces Mistral 3.x only from 11.11.0 (getsentry/sentry-javascript#25827). A reader who upgrades Mistral alone gets no model spans and no warning. This PR makes that kind of drift fail in CI instead of in a reader's terminal.package.jsonsets minimums (^11.11.0,^3.0.0). The lockfile keeps the tested combination, sopnpm installstill gives readers a known-good setup.spans.test.tsruns the example's realanswer()and the optionaltracing.tshelpers against a mocked Mistral API. It needs no API keys. It fails if the model, agent, or tool spans that the README describes are missing.mistral-supportworkflow runs typecheck, lint, and the test on changes. Each Monday it repeats them withpnpm update --latestand opens an issue if they fail, so a new major version of either SDK shows up here first.package.jsonstay meaningful.execute_toolspan now setsgen_ai.agent.name, which the agent tracing docs say it should.pnpm-workspace.yamlis removed. It only exempted the 11.0.0 packages from pnpm's release-age gate.The test catches the original problem and passes at the new minimums:
Live run. I ran
@sentry/node11.13.0 with Mistral SDK 3.5.0, the lockfile versions before the 11.14.0 refresh, through recipe steps 1–8, sending to a scratch Sentry project. The SDK's requests went to OpenRouter'smistralai/mistral-small-2603model, because no direct Mistral key was available, and the example code was otherwise unchanged.gen_ai.chatspans arrived with conversation ID6dffaf67…, including prompts, tool definitions, tool calls, streamed output and tokens.tracing.tsconnected: 3invoke_agent Order Supportturns, 5gen_ai.chatspans and 3execute_tool lookup_orderspans arrived. Each tool span hasgen_ai.agent.name: Order Support./failturn: its tool span and agent span have statuserror, and no second model call runs. The issue "Order service unavailable (demo)" has culpritlookupOrder(orders.ts)and links to that tool span's trace. The retry answered "processing … next week".One known SDK bug is still present in 11.13.0: the
http.clientspan of every streaming call has statuserrorwith HTTP 200, while thegen_ai.chatspans areok. The example adds no workaround.Not verified: a call to Mistral's own API, and Dependabot's handling of this pnpm 12 lockfile. CI on this PR is the workflow's first run on GitHub, and it passed.
Related: getsentry/sentry-docs (Mistral 3.x supported range), getsentry/static-sites and mistralai/cookbook (recipe text and snippet sync). Links follow in comments.