Repository navigation
Comparing changes
Open a pull request
base repository: getsentry/sentry-javascript
base: f109d92
head repository: getsentry/sentry-javascript
compare: ce5009a
- 19 commits
- 210 files changed
- 14 contributors
Commits on Aug 31, 2026
-
Configuration menu - View commit details
-
Copy full SHA for dd7b7a6 - Browse repository at this point
Copy the full SHA dd7b7a6View commit details
Commits on Sep 1, 2026
-
fix(v10/nextjs): Register Vercel AI span processors on Next.js (#23773)
- On Next.js, Vercel AI spans arrive unprocessed — raw `ai.generateText` / `ai.toolCall`, no `gen_ai` op - Next.js bundles `ai`, so it is never patched, and the `Modules` fallback misses workspace and transitive deps - Registered in `init` rather than on the default integration, which a user-supplied `vercelAIIntegration()` would replace - No e2e: reproducing needs `ai` hidden from `Modules`, and this gating is gone in v11 - Telemetry still needs per-call `experimental_telemetry: { isEnabled: true }`; docs to follow Ref: https://linear.app/getsentry/issue/TET-2891/vercel-ai-sdk-v6-instrumentation-is-broken-on-nextjs Co-authored-by: Claude Opus 5 (1M context) <[email protected]>Configuration menu - View commit details
-
Copy full SHA for 171c1fd - Browse repository at this point
Copy the full SHA 171c1fdView commit details -
fix(v10/core): Match wrapped Facebook Mobile browser errors in `DEFAU…
…LT_IGNORE_ERRORS` (#23877)
Configuration menu - View commit details
-
Copy full SHA for f2d7d10 - Browse repository at this point
Copy the full SHA f2d7d10View commit details
Commits on Sep 2, 2026
-
fix(v10/core): resolve MCP capture policy per operation (#23796)
Backport of: #23437 ## Differences to the original PR - `packages/core/src/integrations/mcp-server/transport.ts`: the no-client fallback in `resolveMcpOptions` is `false` for `recordInputs`/`recordOutputs`, not `true`. On v10 `resolveDataCollectionOptions` still routes through the `sendDefaultPii` bridge when `dataCollection` is absent, so the old `wrapMcpServerWithSentry` code fell back to `false` when no client existed. Keeping `true` here would start capturing MCP inputs and outputs on a maintenance branch. - `packages/core/src/integrations/mcp-server/transport.ts`: `startInactiveSpan` is imported from `../../tracing` together with `withActiveSpan`; v10 has no separate `../../tracing/trace` import in this file. - `packages/core/test/lib/integrations/mcp-server/capturePolicy.test.ts`: the span-config helpers use `sentry.source` instead of `sentry.segment.name.source`, and the tool config carries a top-level `op: 'mcp.server'`, matching v10's `buildMcpServerSpanConfig`. The no-client case asserts that inputs and outputs are omitted, following the fallback above. - `dev-packages/e2e-tests/test-applications/node-express/src/app.ts`: the `dataCollection.genAI` block is not added. On v10 the presence of any `dataCollection` key switches the resolution base from the `sendDefaultPii` bridge to the permissive spec defaults, which would have flipped `userInfo`, `cookies`, `httpHeaders`, `httpBodies` and `databaseQueryData` on for every other test in this app. Without the block, `genAI` already resolves to `{ inputs: false, outputs: false }`, so the new MCP e2e assertions hold unchanged. - `dev-packages/e2e-tests/test-applications/cloudflare-mcp-agent/src/index.ts`: the `genAI` settings are merged into the existing `dataCollection: { userInfo: true }` object. v10 already sets `dataCollection` in both `Sentry.init` calls, so the original patch would have produced a duplicate key and silently dropped `userInfo: true`. Co-authored-by: Miguel Betegón <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 374e76f - Browse repository at this point
Copy the full SHA 374e76fView commit details -
fix(v10/nextjs): Fix SDK import crashing under jsdom/happy-dom (#23906)
Since 10.72.0, importing `@sentry/nextjs` on the server crashes when a `document` global exists. jsdom and happy-dom define one while tests run in Node (#23789, introduced by #23667). What went wrong: 1. `@sentry/server-utils` now bundles the code-transformer plugin, compiled from ESM to CJS. Rollup replaces `import.meta.url` with a snippet that assumes "a `document` global means a browser". This is now fixed by always emitting the Node form, since this package only runs in Node. 2. The Next.js server entry re-exports `withSentryConfig`, so just importing the SDK ran the bundler plugin's module-scope code. The plugins now load lazily when the build config actually runs. Build behavior is unchanged (still synchronous, Next.js webpack configs can't be async), but importing the SDK no longer touches them. This also removes the `WebAssembly.compile()` call behind the Cloudflare cold-start errors (reference - but needs to be verified [#22794](#22794)) Fixes #23789
Configuration menu - View commit details
-
Copy full SHA for c50fcb8 - Browse repository at this point
Copy the full SHA c50fcb8View commit details -
test(e2e): Assert Next.js Cloudflare worker bundle stays free of orch…
…estrion bundler plugins (#23910) Adds one test to the `nextjs-16-cf-workers` e2e app. After the OpenNext build, it scans every script in `.open-next/` (except static assets) and fails if the orchestrion bundler plugins show up, naming the offending files. The plugins are build-time-only, but they used to get compiled into the worker bundle, where an unawaited `WebAssembly.compile()` crashed every cold start. The bundle check is deterministic, unlike waiting for an error to not appear. The below issue is fixed in #23906 already, this PR is just adding the verification. Closes #22794
Configuration menu - View commit details
-
Copy full SHA for f44df80 - Browse repository at this point
Copy the full SHA f44df80View commit details
Commits on Sep 3, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 01c55a8 - Browse repository at this point
Copy the full SHA 01c55a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef7040e - Browse repository at this point
Copy the full SHA ef7040eView commit details -
fix(v10/sveltekit): Read SvelteKit config from the Vite plugin (#23998)
Backport of: #23678 ## Differences to the original PR - `src/vite/sentryVitePlugins.ts`: dropped the `warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions'])` call. That line is pre-existing context on `develop` from #23366, which removed the option in v11 — v10 still supports it, and `warnOnRemovedBuildOptions` isn't exported from v10's `@sentry/core`. - `src/vite/sentryVitePlugins.ts` (`generateVitePluginOptions`): kept v10's deprecated `sourceMapsUploadOptions` / `unstable_sentryVitePluginOptions` merging untouched. Only this PR's actual change was applied — `adapter` is now destructured out of the options handed to the Vite plugin and the explicit `adapter: svelteKitPluginOptions.adapter` was dropped. The placeholder is `_filtered5` rather than `_filtered3` because v10 filters two extra deprecated options. - `test/vite/sentrySvelteKitPlugins.test.ts`: plugin-count expectations are v10's counts plus one for the new kit config resolver (8/3/4/7), not `develop`'s (9/4/5/8). v10 has no orchestrion Vite plugin — that's #22768, v11-only.
Configuration menu - View commit details
-
Copy full SHA for 8d6df44 - Browse repository at this point
Copy the full SHA 8d6df44View commit details
Commits on Sep 4, 2026
-
fix(server-utils): Include Gemini reasoning tokens in Vercel AI token…
… usage (#23433) Gemini reasoning models undercount their output tokens in the Vercel AI integration. Gemini reports its reasoning ("thoughts") tokens separately from the visible candidate output, so the AI SDK's `outputTokens` covers only the answer and exposes the reasoning count through `providerMetadata.google.usageMetadata.thoughtsTokenCount`. `getProviderMetadataAttributes()` handled OpenAI, Anthropic, Bedrock and DeepSeek metadata but never looked at the Google/Vertex block, so the reasoning tokens were dropped from `gen_ai.usage.output_tokens` and the total was computed as input + candidate-only output. Per the [gen_ai token usage conventions](https://develop.sentry.dev/sdk/telemetry/attributes.md), `gen_ai.usage.output_tokens` includes reasoning tokens. The fix reads the `google`/`vertex` `usageMetadata`, derives output as `candidatesTokenCount + thoughtsTokenCount`, sets the total from the real `totalTokenCount` and records the reasoning breakdown under `gen_ai.usage.reasoning.output_tokens`. Both the OTel span path and the `ai` tracing-channel path go through this shared helper, so both emit the corrected shape. Deriving output from the raw candidate + thoughts counts (rather than adding reasoning onto the existing SDK value) is deliberate: it stays correct even if a future AI SDK version folds reasoning into `outputTokens` itself, so it cannot double count. The change is gated on `thoughtsTokenCount > 0`, so non-reasoning Gemini responses are left exactly as they were. ## Root cause `getProviderMetadataAttributes()` in `packages/server-utils/src/ai/vercel-ai/index.ts` had no `google`/`vertex` branch. The total is also computed from input + output before provider metadata is applied. For a real Gemini reasoning response: ``` usageMetadata { promptTokenCount: 14, candidatesTokenCount: 1, thoughtsTokenCount: 100, totalTokenCount: 115 } ai-sdk result.usage { inputTokens: 14, outputTokens: 1, totalTokens: 115, reasoningTokens: 100 } ``` the emitted span attributes were, before the fix: ```json {"gen_ai.usage.output_tokens":1,"gen_ai.usage.input_tokens":14,"gen_ai.usage.total_tokens":15} ``` and after the fix: ```json {"gen_ai.usage.output_tokens":101,"gen_ai.usage.input_tokens":14,"gen_ai.usage.total_tokens":115,"gen_ai.usage.reasoning.output_tokens":100} ``` A vitest covering the OTel processor path and the shared `getProviderMetadataAttributes()` helper (including the v6 `vertex` key and a non-reasoning regression case) is added in `packages/server-utils/test/ai/lib/tracing/vercel-ai-reasoning-tokens.test.ts`. --- - [x] If you've added code that should be tested, please add tests. - [x] Ensure your code lints and the test suite passes (`yarn lint`) & (`yarn test`). - [ ] Link an issue if there is one related to your pull request. If no issue is linked, one will be auto-generated and linked. --- AI assistance (Claude, Anthropic) was used in developing this change. The design, review and verification were done by the author. Verified locally before submitting: `yarn test` in `packages/server-utils` (377 passing, 4 new), `yarn lint` (oxlint, clean), `oxfmt --check` (clean) and `yarn build:types` (tsc, clean). --------- Co-authored-by: zkasuran <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: RulaKhaled <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3e0eccc - Browse repository at this point
Copy the full SHA 3e0ecccView commit details -
fix(v10/nuxt): Windows file:// for import-in-the-middle hook and isAb…
…solute for C:\ (#24026) Backport of #23653 --------- Co-authored-by: halillusion <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2ce0ea1 - Browse repository at this point
Copy the full SHA 2ce0ea1View commit details
Commits on Sep 7, 2026
-
feat(v10): Streamline isolation scope handling & reset in isolation s…
…copes (#24152) Backport of: #22890 ## Differences to the original PR - `packages/server-utils/` does not exist on v10. The AsyncLocalStorage async context strategy lives in three copies there: `packages/node-core/src/light/asyncLocalStorageStrategy.ts`, `packages/cloudflare/src/async.ts` and `packages/deno/src/async.ts`. The propagation context reset in `withIsolationScope` is applied to all three. - The cloudflare and deno copies share the current scope by reference in `withIsolationScope` on v10 (develop forks it since #22889, which is not on v10). The backport forks the current scope in those two `withIsolationScope` implementations, otherwise the reset would overwrite the caller's propagation context. `withSetIsolationScope` and `withSetScope` are left as they are on v10. - The `packages/server-utils/test/async-context.test.ts` cases are added to `packages/cloudflare/test/async.test.ts` (plus one case for the current-scope fork above) and to `packages/node-core/test/light/asyncLocalStorageStrategy.test.ts`. There is no vitest suite for the deno strategy, so that copy is not covered by a unit test. - Dropped the `packages/vercel-edge/test/middlewareTraceIsolation.test.ts` hunk; that file does not exist on v10. Fixes #24118 Before: https://sentry-sdks.sentry.io/explore/traces/trace/aeac0f0087dc4636af1c1ea2080dc8be/ After: https://sentry-sdks.sentry.io/explore/traces/trace/94a5f3cc2384449ab8fe0891c69cfc75/ Co-authored-by: Francesco Gringl-Novy <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b627037 - Browse repository at this point
Copy the full SHA b627037View commit details -
Configuration menu - View commit details
-
Copy full SHA for de25dcb - Browse repository at this point
Copy the full SHA de25dcbView commit details
Commits on Sep 9, 2026
-
fix(v10/nextjs): Keep the Pages Router runtime out of App Router clie…
…nt bundles (#24223) Backport of: #24188 ## Differences to the original PR - `packages/nextjs/src/client/routing/pagesRouterNavigationInstrumentation.ts`: uses v10's `SEMANTIC_ATTRIBUTE_SENTRY_OP`/`SEMANTIC_ATTRIBUTE_SENTRY_SOURCE` and the plain route/URL span name; v10 has no `@sentry/conventions/op`, `SENTRY_SEGMENT_NAME_SOURCE`, or span-streaming name fallback. The `__BUILD_MANIFEST`-typed `globalObject` moved here with the route matching code. - `packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts`: keeps v10's pageload code (`browserPerformanceTimeOrigin` start time, v10 attribute constants); only the navigation half and the `next/router` import were removed. - `dev-packages/e2e-tests/test-applications/nextjs-16/tests/build-output.test.ts`: new file on v10 containing only the bundle assertion; the absolute-path-imports test from `develop` depends on a `@sentry-internal/test-utils` helper that does not exist on v10.
Configuration menu - View commit details
-
Copy full SHA for c89f6e6 - Browse repository at this point
Copy the full SHA c89f6e6View commit details -
fix(v10/cloudflare): Auto-instrument classes re-exported from the wor…
…ker entry (#24181) Backport of: #23282 ## Differences to the original PR - `packages/cloudflare/test/vite/autoInstrument.test.ts`: the three new agent re-export expectations include `enableRpcTracePropagation: opts?.enableRpcTracePropagation ?? true,` in the generated `__SENTRY_OPTIONS__` snippet. v10 still emits that property, develop does not, so the strings had to match the v10 output (identical to the existing expectation in the same file). - `packages/cloudflare/src/durableobject.ts`, `packages/cloudflare/src/workflows.ts`: the `InstrumentedClass` + `markAsInstrumented` change was applied on top of the v10 generic signatures. v10 does not have the `DefaultEnv` / `ResolveEnv` / `StrictCloudflareOptions` generics refactor, so those signatures stay as they are on v10; the behavior change is the same. - `dev-packages/cloudflare-integration-tests/runner.ts`: `receivedEnvelopes.push(envelope)` was added next to the v10 wording of the surrounding waiter comment. The behavior of the fix is unchanged, all deviations are adaptations to the older code shape.
Configuration menu - View commit details
-
Copy full SHA for 264f990 - Browse repository at this point
Copy the full SHA 264f990View commit details -
fix(v10/browser): Set
user_agent.originalon all spans for consiste……nt filtering (#24226) Backport of: #24216 Technically, this removes an attribute and sets another. However, this only affects span streaming, which is opt-in and not 100% stable on v10, so I think it's fine. ## Differences to the original PR - `packages/browser/src/integrations/httpcontext.ts`: kept v10's `@sentry/core/browser` import path and its unfiltered `reqData.headers` / `reqData.url`. v10 has no `dataCollection` header filtering (`_INTERNAL_filterKeyValueData`, `filterCollectedUrl`), so `processSpan` takes no `client` argument here. - `packages/browser/test/integrations/httpcontext.test.ts`: dropped the `dataCollection` suite updates (that suite doesn't exist on v10) and added the `USER_AGENT` const the ported assertions reference. - Skipped `nextjs-app-dir` / `nextjs-pages-dir` `transactions.test.ts`: on v10 these still assert on transaction-event `contexts.trace.data`, which carries no user-agent attribute, so there is nothing to rename. - The interaction test lives at `browserTracingIntegration/interactions-streamed/` on v10 rather than `tracing/interactions/spans/`; same content, different path. The behavioral fix itself is ported in full.
Configuration menu - View commit details
-
Copy full SHA for 9f38e48 - Browse repository at this point
Copy the full SHA 9f38e48View commit details -
Configuration menu - View commit details
-
Copy full SHA for 371ed5d - Browse repository at this point
Copy the full SHA 371ed5dView commit details -
meta(changelog): Update changelog for 10.74.0 (#24252)
Co-authored-by: Claude Fable 5.1 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4b24ddd - Browse repository at this point
Copy the full SHA 4b24dddView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce5009a - Browse repository at this point
Copy the full SHA ce5009aView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff f109d92...ce5009a