Skip to content

meta(changelog): Update changelog for 10.37.0#18984

Merged
andreiborza merged 33 commits intomasterfrom
prepare-release/10.37.0
Jan 27, 2026
Merged

meta(changelog): Update changelog for 10.37.0#18984
andreiborza merged 33 commits intomasterfrom
prepare-release/10.37.0

Conversation

@andreiborza
Copy link
Member

No description provided.

github-actions bot and others added 30 commits January 21, 2026 15:44
[Gitflow] Merge master into develop
…#18906)

**Changes**

- This simplifies AI message truncation to always keep only the last
message and truncate it if needed. Previously we dropped oldest messages
one by one until we fit within the limit.
- Set embeddings input as a separate attribute `gen_ai.embeddings.input`
and do not truncate that.
- Also added support for truncating plain string arrays. Not sure if we
need that at the moment, since we no longer truncate embeddings, but
shouldn't hurt.

**Test Updates**

- Updated all node integration and unit tests to work with the new
logic.
- Extended the node integration suite to always test the two main
scenarios (keep the large message and then either truncate if the last
message is large or leave it as is if it is small).
- Removed the embeddings truncation tests and instead added a new
embeddings scenario that checks that embeddings inputs are all kept
(even if an array with multiple entries is passed).

Closes #18916
This PR adds automatic instrumentation for global request and function
middleware in TanStack Start applications.

**Overview**

The sentryTanstackStart Vite plugin now automatically wraps
requestMiddleware and functionMiddleware arrays in `createStart()` with
Sentry instrumentation. This is done via a source code transformation
during the build that converts:

```
createStart({
  requestMiddleware: [myMiddleware],
  functionMiddleware: [anotherMiddleware],
});
```

into:

```
import { wrapMiddlewaresWithSentry } from '@sentry/tanstackstart-react';

createStart({
  requestMiddleware: wrapMiddlewaresWithSentry({ myMiddleware }),
  functionMiddleware: wrapMiddlewaresWithSentry({ anotherMiddleware }),
});
```

**Usage**

Auto-instrumentation is enabled by default. To explicitly disable it:

```
// vite.config.ts
import { sentryTanstackStart } from '@sentry/tanstackstart-react';

export default defineConfig({
  plugins: [
    sentryTanstackStart({
      org: 'your-org',
      project: 'your-project',
      autoInstrumentMiddleware: false, // Disable auto-instrumentation
    }),
  ],
});
```

This should give users flexibility in case things go wrong.

**Implementation Details**

- Uses a regex-based approach to transform source files containing
`createStart()`
- Skips transformation if the user has already manually wrapped
middlewares with `wrapMiddlewaresWithSentry`
- Only handles simple identifier arrays (e.g., [foo, bar]), not complex
expressions

**Testing**

- Updated E2E tests to use auto-instrumentation for global middleware
- Updated unit tests for the `sentryTanstackStart` plugin
- Added unit tests for `autoInstrumentMiddleware`

**Follow-ups**

Future PRs will add support for non-global request/function middleware.
This PR focuses on global middleware to make it a bit easier to review.
I also want to give users a bit more control by allowing them to disable
auto-instrumentation on a file-level, but this doesn't make sense yet
since the current implementation only patches a single file anyways.

Closes #18845
chore(e2e): Change dynamic react-router server build import to static import
Before submitting a pull request, please take a look at our

[Contributing](https://github.com/getsentry/sentry-javascript/blob/master/CONTRIBUTING.md)
guidelines and verify:

- [ ] ~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`).
- [x] Link an issue if there is one related to your pull request. If no
issue is linked, one will be auto-generated and linked.

Closes #17181

---------

Co-authored-by: JPeer264 <jan.peer@sentry.io>
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #18900

Co-authored-by: JPeer264 <10677263+JPeer264@users.noreply.github.com>
- adds more framework internals to the default ignore list (these will
never emit sourcemaps and we just waste time processing these files)
- updates ignore list to use glob patterns as this is the only way the
cli properly picks them up

closes #18872
This new reason can be used when the client drops telemetry items due to
failing internal validation (e.g. dropping replays that contain invalid
session times)

ref #18316
depends on getsentry/snuba#7654
closes
https://linear.app/getsentry/issue/FE-690/update-js-sdk-to-support-client-discard-invalid
#18953)

We have many e2e test apps and it can be cumbersome to type in which
exact app you want to run. This PR adds a Makefile that uses `fzf` to
give a better experience:


https://github.com/user-attachments/assets/8fe472a6-34ac-4311-81aa-e8d384e51760

Note: Requires having `fzf` installed via `brew install fzf` or other
package managers.
#18796)

This PR distinguishes replays that get dropped due to session length vs.
transport/ratelimit reasons in the client report.

closes #18316

---------

Co-authored-by: Charly Gomez <charly.gomez@sentry.io>
)

Stumbled upon this while working on something else. The source map
related code was always executed on the package manager's `install`
command and as `nuxi prepare` runs on `postinstall`. This step is only
important for generating the types, so we can skip all source map
related things here so this only runs during the actual build.

I also changed the console log a bit so it's more clear what we are
doing.

Nuxt docs: https://nuxt.com/docs/4.x/api/commands/prepare

Closes #18937 (added automatically)
#18945)

While working on the `gen_ai.request.messages` rename I noticed that we
hardcode all the attributes in our ai integration tests (both node and
cloudflare), meaning that we currently need to change each individual
test just to rename one attribute name. This PR refactors this to use
the attributes from our `gen-ai-attributes.ts`. I also added some
missing entries for attributes that we currently hardcode in the
integrations.

Closes #18951 (added automatically)
The nature of running e2e tests in our repo is particular: When making
changes in an SDK, we need to rebuild that SDK and create its tarball,
only then can we run the e2e test application.

Agents lack this context and will often make changes, rebuild the SDK
but not publish a tarball for example.

This skill can be invoked via `/e2e <test-application-name>`, e.g. `/e2e
nuxt-3` and it will detect and perform SDK rebuilds before running the
e2e tests.
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #18796

Co-authored-by: chargome <20254395+chargome@users.noreply.github.com>
… conversations (#18909)

Introduces a new `Sentry.setConversationId()` API to track multi turn AI
conversations across API calls.

> We want to leverage each AI frameworks built-in functionalities
wherever possible. OpenAIs conversation_id, sessions, etc to create the
gen_ai.conversation.id attribute.
> However if the framework does not provide such a mechanism (such as
Google GenAI or Anthropic) we shall provide a common function:
Sentry.setConversationId(...) or sentry_sdk.set_conversation_id(), which
adds the conversation ID to the Scope in a similar way as
Sentry.setUser() and sentry_sdk.set_user() do. When provided in such a
way it will override any automatically detected value.

_Why not just add this as an attribute?_ 
it should only appear as a span attribute, not propagate to logs and
metrics. This keeps AI conversation context isolated to spans where it's
semantically relevant.

- Related to:
https://linear.app/getsentry/issue/TET-1736/python-sdk-add-gen-aiconversationid-to-the-integrations-where-it-is#comment-77bf901d
- Closes:
https://linear.app/getsentry/issue/JS-1515/implement-a-new-sentrysetconversationid-api
#18925)

AI integrations should follow OTel spec and report the
gen_ai.operation.name with the values listed in sentry conventions if
applies getsentry/sentry-conventions#225, this
PR renames gen_ai.operation so that if one of values applies, then that
value MUST be used.

Closes
https://linear.app/getsentry/issue/JS-1527/report-well-known-values-in-gen-aioperationname-attribute
- Bump @opentelemetry/context-async-hooks from 2.4.0 to 2.5.0
  - Bump @opentelemetry/core from 2.4.0 to 2.5.0
  - Bump @opentelemetry/instrumentation from 0.210.0 to 0.211.0
  - Bump @opentelemetry/instrumentation-amqplib from 0.57.0 to 0.58.0
  - Bump @opentelemetry/instrumentation-aws-sdk from 0.65.0 to 0.66.0
  - Bump @opentelemetry/instrumentation-connect from 0.53.0 to 0.54.0
  - Bump @opentelemetry/instrumentation-dataloader from 0.27.0 to 0.28.0
  - Bump @opentelemetry/instrumentation-express from 0.58.0 to 0.59.0
  - Bump @opentelemetry/instrumentation-fs from 0.29.0 to 0.30.0
- Bump @opentelemetry/instrumentation-generic-pool from 0.53.0 to 0.54.0
  - Bump @opentelemetry/instrumentation-graphql from 0.57.0 to 0.58.0
  - Bump @opentelemetry/instrumentation-hapi from 0.56.0 to 0.57.0
  - Bump @opentelemetry/instrumentation-http from 0.210.0 to 0.211.0
  - Bump @opentelemetry/instrumentation-ioredis from 0.58.0 to 0.59.0
  - Bump @opentelemetry/instrumentation-kafkajs from 0.19.0 to 0.20.0
  - Bump @opentelemetry/instrumentation-knex from 0.54.0 to 0.55.0
  - Bump @opentelemetry/instrumentation-koa from 0.58.0 to 0.59.0
- Bump @opentelemetry/instrumentation-lru-memoizer from 0.54.0 to 0.55.0
  - Bump @opentelemetry/instrumentation-mongodb from 0.63.0 to 0.64.0
  - Bump @opentelemetry/instrumentation-mongoose from 0.56.0 to 0.57.0
  - Bump @opentelemetry/instrumentation-mysql from 0.56.0 to 0.57.0
  - Bump @opentelemetry/instrumentation-mysql2 from 0.56.0 to 0.57.0
- Bump @opentelemetry/instrumentation-nestjs-core from 0.56.0 to 0.57.0
  - Bump @opentelemetry/instrumentation-pg from 0.62.0 to 0.63.0
  - Bump @opentelemetry/instrumentation-redis from 0.58.0 to 0.59.0
  - Bump @opentelemetry/instrumentation-tedious from 0.29.0 to 0.30.0
  - Bump @opentelemetry/instrumentation-undici from 0.20.0 to 0.21.0
  - Bump @opentelemetry/resources from 2.4.0 to 2.5.0
  - Bump @opentelemetry/sdk-trace-base from 2.4.0 to 2.5.0
  - Bump @opentelemetry/semantic-conventions from 1.37.0 to 1.39.0

Closes #18958 (added automatically)

---------

Co-authored-by: Charly Gomez <charly.gomez@sentry.io>
#18944)

- rename `gen_ai.request.messages` to `gen_ai.input.messages`
- also rename `gen_ai.request.messages.original_length` to
`gen_ai.input.messages.original_length` (not sure if we get rid of this
attribute in favor of
`sentry.sdk_meta.gen_ai.input.messages.original_length` but for now
renaming to this so we stay consistent since I will do the other rename
in a separate PR)
- fix some more test constants I missed with the last PR

Closes #18919
closes #18946
closes
[JS-1536](https://linear.app/getsentry/issue/JS-1536/contradicting-warnings-between-sentryastro-and-sentry-vite-plugin)

This is a follow up PR for #17396

I also changed the name to `doNotUseTheseOptions` to kinda prevent this
in the future
…sdk_meta.gen_ai.input.messages.original_length` (#18970)

- renames the attribute
- sets the attribute to 1 if the input is a string
- adds more explicit checks for this attribute in the node integration
tests (mostly for truncation tests to verify this works as expected)

Closes #18918
…jection (#18973)

When a stream aborts in Vercel V6 an `AbortError` is thrown. Adding this
to the default ignored errors in the `onUnhandledRejectionIntegration`
integration. We already did this previously, but the exception name
thrown by Vercel changed from V5 to V6. More context can be found in
[this](#17675)
issue.

Closes #17675
The [#17830](#17830)
fixes the error explained in #17781 only for the sentry.client.config.ts
but the error still exists for the sentry.server.config.ts.

With this PR we add the sentry.config.server.ts to the auto generated
tsconfig by extending the types via the [prepare:types
hook](https://nuxt.com/docs/4.x/guide/going-further/modules#adding-type-declarations).

This allows useRuntimeConfig to be properly typed in the root
sentry.server.config.ts, or where ever the client file is found.

Not sure how this could be tested tho, since it is purely types.

Co-authored-by: Federico Torresan <federico.torresan@gruppoadorea.it>
…ad (#18881)

Following up on #18155 and #18346

Fixes an issue where pageload transactions have incorrect names
(URL-based or wildcard-based) when lazy routes load after the span ends
due to idle timeout.

This occurs when using patchRoutesOnNavigation for lazy route loading.
The idle timeout can fire before lazy routes finish loading, causing the
span to end with a wildcard like `/slow-fetch/*` instead of the
parameterized `/slow-fetch/:id`.

The root cause was that the active span was captured after router
creation, making it inaccessible when `patchRoutesOnNavigation` was
called later (span already ended). Also, `patchSpanEnd` was taking a
snapshot of `allRoutes`, so lazy routes added later wouldn't be visible.

This fix:

- Captures the active span before router creation and passes it to
`wrapPatchRoutesOnNavigation`
- Adds a deferred promise mechanism that blocks span finalization until
`patchRoutesOnNavigation` completes
- Uses the global `allRoutes` Set directly instead of a snapshot
- Handles pageload spans in `patchRoutesOnNavigation` (was only handling
navigation before)
…18580)

Adds support for React Router's `unstable_instrumentations` API for
automatic performance monitoring.

Resolves: #18127
Resolves: #18121
Ref: remix-run/react-router#13749
Ref: remix-run/react-router#14412

React Router 7.9.5 introduced the [`unstable_instrumentations`
API](https://reactrouter.com/how-to/instrumentation), which provides
hooks for instrumenting request handlers, loaders, actions, middleware,
and lazy routes. This enables automatic span creation without requiring
manual wrapper functions.

### Server-side

Added `createSentryServerInstrumentation()`:

- `handler.request` - Creates root HTTP server span with parameterized
route names
- `route.loader` - Automatic loader span creation
- `route.action` - Automatic action span creation
- `route.middleware` - Automatic middleware span creation
- `route.lazy` - Lazy route loading spans

```typescript
// entry.server.tsx
import * as Sentry from '@sentry/react-router';

export default Sentry.createSentryHandleRequest({ /* ... */ });
export const handleError = Sentry.createSentryHandleError();
export const unstable_instrumentations = [Sentry.createSentryServerInstrumentation()];
```

### Client-side

Added client instrumentation via `reactRouterTracingIntegration({
useInstrumentationAPI: true })`:

- `router.navigate` - Navigation transaction creation
- `router.fetch` - Fetcher span creation
- `route.loader/action/middleware/lazy` - Client-side route handler
spans

```typescript
// entry.client.tsx
const tracing = Sentry.reactRouterTracingIntegration({ useInstrumentationAPI: true });

Sentry.init({
  integrations: [tracing],
});

<HydratedRouter unstable_instrumentations={[tracing.clientInstrumentation]} />
```

### Backward compatibility

When the instrumentation API is used:
- `wrapServerLoader` and `wrapServerAction` skip creating spans and emit
a warning in debug mode
- Legacy navigation patching in `instrumentHydratedRouter` checks if
instrumentation API handled it
- Server-side OTEL instrumentation for loaders/actions is skipped

### Also:
- Created `serverGlobals.ts` to isolate flag handling (avoids pulling
OpenTelemetry deps in Cloudflare builds)
- Updated `wrapSentryHandleRequest` to explicitly set parameterized
transaction names (improves Hydrogen parameterization)
- Added E2E test application `react-router-7-framework-instrumentation`


### Notes
- Client-side limitation: As of React Router 7.x, HydratedRouter does
not invoke client instrumentation hooks in Framework Mode. Client-side
navigation is handled by existing instrumentHydratedRouter(). The client
instrumentation is prepared for when React Router adds support. See
remix-run/react-router#13749.
- Lazy routes limitation: In Framework Mode, `route.lazy` hooks are not
triggered because the bundler handles code-splitting.

_Needs docs PR_

---------

Co-authored-by: Charly Gomez <charly.gomez@sentry.io>
This PR sets up E2E tests for Next.js 16 running on Cloudflare Workers
using OpenNext.

Some tests yield different transaction names and span attributes, I will
review each of the skipped tests and review the differences and if we
should either consolidate the edge runtime behavior with the node
runtime behavior.


### Known Limitations

Those are the test failures that required skipping.

- Middleware `proxy` filename not being picked up by opennext, yet
`middleware` works on Next 16 😕
- HTTP request headers not extracted as span attributes
- Metrics not emitting on Cloudflare Workers
- Middleware `transaction_info.source` is `'url'` instead of `'route'`
- Server component spans have different names (e.g., `'resolve segment
modules'` instead of specific component names)
- Missing `http.response.status_code` / `http.status_code` attributes

I plan to follow up with another PR to address these, but the higher
priority is making sure the SDK doesn't crash and works to some degree
on CF worker apps.

Closes #18929 (added automatically)
Bumps versions of the bundler plugins to include the latest fixes
related to debug ID injection.

Version 4.6.2 already included the [fix for preventing double-injected
debug
IDs](getsentry/sentry-javascript-bundler-plugins#827)
(closes #18519) but
version 4.7.0 brings some further improvements for debug ID injection
and also adds [improvements for the build plugin
manager](getsentry/sentry-javascript-bundler-plugins#836)
(which will be used in Nuxt SDK in the future).
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #18971

Co-authored-by: s1gr1d <32902192+s1gr1d@users.noreply.github.com>
So far we put all the messages including the system prompt on
gen_ai.request.messages. Instead, the system prompt should be pulled out
and set as a separate attribute called gen_ai.system_instructions. For
now we will search for the first system message and use that.

Closes #18917
`yarn prisma` is better to use since it uses the correct `node_modules`
path. Without it it may break at some point since the global package
could be different at some point.

Closes #18976 (added automatically)
closes #18868
closes
[JS-1498](https://linear.app/getsentry/issue/JS-1498/allow-customization-of-level-mapping-in-createsentrywinstontransport)

ATM it is not possible to map custom levels to OpenTelemetry levels. The
option `customLevelMap` has been added to make this possible. Which
means that custom levels would have never been send to Sentry, as they
were not mapped correctly.

Now when there are custom levels it can be used like this:

```js
const customLevels = {
  levels: {
    customCritical: 0,
    customNotice: 2,
  },
};

const SentryWinstonTransport = Sentry.createSentryWinstonTransport(Transport, {
  customLevelMap: {
    customCritical: 'fatal',
    customNotice: 'info',
  },
});

const mappedLogger = winston.createLogger({
  levels: customLevels.levels,
  level: 'customNotice', // this needs to be added due to winstonjs/winston#1491
  transports: [new SentryWinstonTransport()],
});
```

### Merge checklist

- [ ] Sentry Docs update issue has been created
@andreiborza andreiborza changed the base branch from develop to master January 27, 2026 09:29
@andreiborza andreiborza requested a review from a team as a code owner January 27, 2026 09:29
CHANGELOG.md Outdated

## 10.37.0

Work in this release was contributed by @sebws, @harshit078, and @fedetorre. Thank you for your contributions!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, we put this comment at the end of the release notes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about this PR, I should have known better...

Thanks for catching!

CHANGELOG.md Outdated
This is particularly useful for tracking multiple AI API calls that are part of the same conversation, allowing you to analyze entire conversation flows in Sentry.
The conversation ID is stored on the isolation scope and automatically applied to spans via the new `conversationIdIntegration`.

### Important Changes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This heading should be at the top

@andreiborza andreiborza force-pushed the prepare-release/10.37.0 branch from 5028220 to 429ac16 Compare January 27, 2026 09:38
@andreiborza andreiborza requested a review from s1gr1d January 27, 2026 09:39
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.32 kB added added
@sentry/browser - with treeshaking flags 23.83 kB added added
@sentry/browser (incl. Tracing) 42.14 kB added added
@sentry/browser (incl. Tracing, Profiling) 46.78 kB added added
@sentry/browser (incl. Tracing, Replay) 80.75 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.4 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 85.47 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 97.65 kB added added
@sentry/browser (incl. Feedback) 42.04 kB added added
@sentry/browser (incl. sendFeedback) 30.01 kB added added
@sentry/browser (incl. FeedbackAsync) 35.01 kB added added
@sentry/browser (incl. Metrics) 26.43 kB added added
@sentry/browser (incl. Logs) 26.57 kB added added
@sentry/browser (incl. Metrics & Logs) 27.24 kB added added
@sentry/react 27.05 kB added added
@sentry/react (incl. Tracing) 44.37 kB added added
@sentry/vue 29.76 kB added added
@sentry/vue (incl. Tracing) 43.93 kB added added
@sentry/svelte 25.33 kB added added
CDN Bundle 27.89 kB added added
CDN Bundle (incl. Tracing) 42.93 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 43.75 kB added added
CDN Bundle (incl. Tracing, Replay) 79.68 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 85.11 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.03 kB added added
CDN Bundle - uncompressed 81.6 kB added added
CDN Bundle (incl. Tracing) - uncompressed 127.14 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 129.97 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 243.74 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 256.54 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 259.35 kB added added
@sentry/nextjs (client) 46.73 kB added added
@sentry/sveltekit (client) 42.51 kB added added
@sentry/node-core 52.02 kB added added
@sentry/node 166.05 kB added added
@sentry/node - without tracing 93.79 kB added added
@sentry/aws-serverless 109.31 kB added added

@github-actions
Copy link
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,468 - - added
GET With Sentry 1,780 19% - added
GET With Sentry (error only) 6,098 64% - added
POST Baseline 1,192 - - added
POST With Sentry 598 50% - added
POST With Sentry (error only) 1,063 89% - added
MYSQL Baseline 3,317 - - added
MYSQL With Sentry 461 14% - added
MYSQL With Sentry (error only) 2,713 82% - added

@andreiborza andreiborza merged commit c60ca61 into master Jan 27, 2026
212 checks passed
@andreiborza andreiborza deleted the prepare-release/10.37.0 branch January 27, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.