Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Jan 12, 2026

No description provided.

github-actions bot and others added 30 commits December 19, 2025 11:20
[Gitflow] Merge master into develop
Adds 3 size-limit entries for logs, metrics and both combined. I
have some optimizations lined up for reducing bundle size in both but I
need a baseline to see if they actually do any good.
…ners (#18581)

Previously, we called `onHidden` in our slightly modified version of the
vendored in `whenIdleOrHidden` API from web-vitals. This caused 2
additional event listeners to be registered with each `whenIdleOrHidden`
invocation, which also didn't get cleaned up properly.

To fix this, and prevent similar situations, this PR:
- inlines the `pagehide` event listener registration in
`whenIdleOrHidden` so that we can remove the `onHidden` call
- adds `once: true` to the listener registration so that the callback is
only invoked once
- deprecates `onHidden` because IMHO we should remove it in v11 and
replace the one remaining use of it with a direct `visibilityChange`
subscription.

Closes #18584 (added automatically)

closes
https://linear.app/getsentry/issue/JS-1339/investigate-multiple-event-listeners-in-nextjs-sdk
So far if multiple expected envelopes were chained on the cloudflare
test runner, the runner expected them to arrive in the order pre-defined
by the caller, else the test would fail. This can sometimes be too
strict, resulting in flakes. This PR adds an unordered mode to the
runner that lifts the order restriction on incoming envelopes.

This mode is also used in the hono cloudflare test now.

Closes #18589
…18545)

(closes #18534)
(closes
[JS-1319](https://linear.app/getsentry/issue/JS-1319/cloudflare-transport-doesnt-consume-fetch-response-bodies))

This consumes the body so it is safe to be closed by Cloudflare Workers.
Unfortunately this cannot be reproduced locally and is only happening
when the worker is being deployed (so there is no E2E test for this)

@AbhiPrasad do you think it is necessary to add this code snippet in the
other transports we have? It is what I've read specifically to
Cloudflare, since they seem to be super strict on it, but this could
potentially be a problem in other runtimes as well.
Pino allows using custom namespaces and this PR makes sure they are
actually used.

The symbols are extracted with a method, although Pino would allow
getting them from `pino.symbols`
([docs](https://getpino.io/#/docs/api?id=pino-symbols)). However, we
only have access to the `logger` instance.

Closes #18594
E2E tests for solid/vue tanstack router fail starting `1.42.x`. Pinning
these for now until we have figured out what's going on.


Closes #18612 (added automatically)
https://github.com/cloudflare/agents/releases/tag/agents%400.2.34
started externalizing the ai package. Pinning this to the version before
this let's our tests pass.

When bumping the `agents` package to `0.3.0` and adding `ai` with v6
types start breaking.

Closes #18611 (added automatically)
IITM has a new patch release with a fix that we need to properly
instrument submodule imports in our Otel integrations (for instance to
make [this](#18403)
work).

Closes #18613
The example pages the Sentry wizard adds to the codebase use
`.diagnoseSdkConnectivity()`. It's also possible to already set up a
tunnel through the wizard. However, this tunnel was previously not
respected.

Closes #17991
Ref / Resolves:
#18089

`hoist-non-react-statics` package we depend on is not ESM compatible,
and causing issues for users on Cloudflare environments. As this package
has not been updated in 5 years, and our use has not changed for long
time, I think we can just inline this to make it compatible, and save
users from explicitly externalizing this package.

---------

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

Removes `resolve` dependency and replaces it with `createRequire` which
would work in esm modules as well, since our min Node.js version is 18
then it should be fine to do this replacement.

This should reduce the npm install size and the SSR bundle size for the
SDK.

closes #12860
This came up while working on #18580

The span ops should be using snake_case as per our spec:
https://develop.sentry.dev/sdk/telemetry/traces/span-operations/
…18620)

When using
[exactOptionalPropertyTypes](https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes),
it is pretty hard to match Fastify's instance types given all the
missing overloads from the partial signature we have. The problematic
area is around `addHook`.

We either need to have all the signatures implemented exactly, or
outright import Fastify's types which is not ideal since it is not a
dependency.

I opted to relax the types specifically for `setupFastifyErrorHandler`
by providing a minimal instance with the one method it needs to avoid TS
trying to matching the other properties and methods signatures, not
ideal but simple enough.

I verified that this works for Fastify v3 throughout v5

closes #18619
…#18628)

The `offline.test.ts` unit tests in core have been bugging me for a long
time because they take almost 30s to run locally. Which makes running
tests in watch mode in core quite annoying.

The core problem in these tests was that we used real timers and waited
for up to 25s in one test. This PR:
- uses vitest's fake timers instead of real timers
- removes the `waitUntil` calls in favor of advancing timers. Mostly by
the upper bound we specified before, though in some situations, I had to
use a lower value because the previous waitUntil condition was satisfied
earlier.
- re-enables the rate limiting test which was flaky before. I'm curious
if it'll flake again but my guess is that with the more strict fake
timers, it might just behave as we hope.

Now, the tests only take a couple of ms to complete.  

Closes #18630 (added automatically)
Setting an IPv6 URL as a DSN previously didn't work, see #2996.
This patch updates the `DSN_REGEX` to correctly match IPv6 and fixes the then
occuring issue that the brackets "[" and "]" are in the request's
hostname and prevent the request from being made.

---------

Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #17708

Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
…tion (#18416)

Adds the previously introduced `isolateTrace` option to the `node-cron` instrumentation. 
This ensures that independent tasks triggered by the same cron have distinct traces when `isolateTrace` is set.
…edback (#18492)

1. fixed incorrect Bun version command
2. removed unused variable
3. improved user feedback(logs a clear message when Bun is already on
the latest version instead of silently exiting)

---------

Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #18416

Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #18492

Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
…orFilterIntegration` (#18632)

Some users get flooded by third party errors despite having set their
third party error filtering to
`"drop-error-if-contains-third-party-frames"`. This comes from the fact
that often the stacktrace includes our internal wrapper logic as last
trace in the stack.

With this PR we're trying to work around this by specifically ignoring
these frames with a new opt-in mechanism. Marked this as experimental,
so users will know this option might lead to errors being misclassified.

- Adds a new experimental option
`experimentalExcludeSentryInternalFrames` to the
`thirdPartyErrorFilterIntegration`
- Once enabled we apply a strict filter for frames to detect our
internal wrapping logic and filter them out so they do not misclassify
injected code as internal errors.

Closes #13835
…gs (#18638)

With this PR we emit a warning for client, node and edge whenever the
user sets `debug: true` in `init` but at the same time treeshakes
logging statements using webpack.

This will not emit anything for turbopack.

closes
https://linear.app/getsentry/issue/FE-610/warn-at-build-time-for-conflicting-disablelogger-and-debug-settings-in
Ensures Vercel AI span op is always set correctly at span start,
regardless of whether the model ID is available.

Changes:

- Removed the model ID check gate before calling processGenerateSpan -
the op is determined by span name, not model ID
- Span name updates (e.g., generate_text gpt-4) are now only applied
when model ID exists, avoiding undefined in names
- Added integration test for late model ID scenario

Closes #18448
Explicitly allow `undefined` as a value for some init options to support TS setups with `exactOptionalPropertyTypes` enabled.
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #18024

Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
…ons (#17583)

This adds a better way to ensure we flush in node-based vercel
functions.

Note that this _does not_ work in edge functions, so we need to keep the
`vercelWaitUntil` code around for this - but we can noop it in node and
instead rely on the better way to handle this, I believe.

@chargome when you're back, can you verify if this makes sense? 😅 

Closes #17567

---------

Co-authored-by: Charly Gomez <charly.gomez@sentry.io>
Pre-work for #18160 

We have multiple places in which we need to combine the `ScopeData` of
global, isolation and current scopes, to apply this data to telemetry
items (events, logs, metrics, soon also spansV2). Previously, we did
this in-place or with helpers that were not re-used. This PR now unifies
the various locations to one helper from core which can be reused
everywhere.

Closes #18586 (added automatically)
andreiborza and others added 5 commits January 9, 2026 16:40
…#18756)

The `thirdPartyErrorFilterIntegration` was not able to identify
first-party worker code as because module metadata stayed in the
worker's separate global scope and wasn't accessible to the main thread.

We now forward the metadata the same way we forward debug ids to the
main thread which allows first-party worker code to be identified as
such.

Closes: #18705
Applies scope attributes to metrics, analogously to how we apply them to
logs (see #18184).
Added unit and integration tests.
Currently the cache components feature in Next.js prevents us from using
any random value APIs like:

- `Date.now`
- `performance.now`
- `Math.random`
- `crypto.*`

We tried resolving this by patching several span methods, but then we
have plenty of other instances where we use those APIs, like in trace
propagation, timestamp generation for logs, and more.

Running around and patching them one by one in the Next.js SDK isn't a
viable solution since most of those functionalities are strictly
internal and cannot be patched from the outside, and adding escape
hatches for each of them is not maintainable.

So I'm testing out the other way around, by hunting those APIs down and
wrapping them with a safe runner that acts as an escape hatch. Some of
the Vercel engineers suggested doing that, but we need to do it for
~almost every call~ (see Josh
[comment](#18700 (comment))
below).

The idea is an SDK can "turn on" the safe runner by injecting a global
function that executes a callback and returns its results. I

### How does this fix it for Next.js?

The Next.js SDK case, a safe runner would be an `AsyncLocalStorage`
snapshot which is captured at the server runtime init, way before any
rendering is done.

```ts
const sym = Symbol.for('__SENTRY_SAFE_RANDOM_ID_WRAPPER__');
const globalWithSymbol: typeof GLOBAL_OBJ & { [sym]?: SafeRandomContextRunner } = GLOBAL_OBJ;

globalWithSymbol[sym] = AsyncLocalStorage.snapshot();

// core SDK then offers a fn to run any random gen function
export function withRandomSafeContext<T>(cb: () => T): T {
  // Looks for the global symbol and if it is set it uses the runner
  // otherwise just runs the callback normally.
}
```

I kept the API internal as much as possible to avoid users messing up
with it, but the `@sentry/opentelemetry` SDK also needed this
functionality so I exported the API with `_INTERNAL` prefix as we
already do.

---

I tested this in a simple Next.js app and it no longer errors out, and
all current tests pass. I still need to take a look at the traces and
see how would they look in cached component cases.

Charly is already working on this and may have a proper solution, but I
thought to just see if we can ship a stopgap until then.

On the bright side, this seems to fix it as well for Webpack.

closes #18392 
closes #18340
…#18762)

Adds support for applying an application key to WASM stack frames that
can be then used in the `thirdPartyErrorFilterIntegration` for detection
of first-party code.

This changes how `thirdPartyErrorFilterIntegration` deals with native
frames to also check for a `instruction_addr` for WASM-native code.

Usage:
```js
Sentry.init({
  integrations: [
    wasmIntegration({ applicationKey: 'your-custom-application-key' }), ←───┐
    thirdPartyErrorFilterIntegration({                                      │
      behaviour: 'drop-error-if-exclusively-contains-third-party-frames',   ├─ matching keys
      filterKeys: ['your-custom-application-key'] ←─────────────────────────┘
    }),
  ],
});
```

Closes: #18705
@Lms24 Lms24 self-assigned this Jan 12, 2026
@Lms24 Lms24 changed the base branch from develop to master January 12, 2026 10:47
@Lms24 Lms24 marked this pull request as ready for review January 12, 2026 10:47
@Lms24 Lms24 requested review from a team as code owners January 12, 2026 10:47
…8769)

closes #18758

Prints a note if a user is using deprecated webpack options with
turbopack.
@Lms24 Lms24 force-pushed the prepare-release/10.33.0 branch from 73b1f80 to 10fa35e Compare January 12, 2026 11:02
@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.95 kB added added
@sentry/browser - with treeshaking flags 23.47 kB added added
@sentry/browser (incl. Tracing) 41.68 kB added added
@sentry/browser (incl. Tracing, Profiling) 46.27 kB added added
@sentry/browser (incl. Tracing, Replay) 80.31 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.01 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 85 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 97.21 kB added added
@sentry/browser (incl. Feedback) 41.67 kB added added
@sentry/browser (incl. sendFeedback) 29.64 kB added added
@sentry/browser (incl. FeedbackAsync) 34.63 kB added added
@sentry/browser (incl. Metrics) 26.05 kB added added
@sentry/browser (incl. Logs) 26.2 kB added added
@sentry/browser (incl. Metrics & Logs) 26.85 kB added added
@sentry/react 26.68 kB added added
@sentry/react (incl. Tracing) 43.93 kB added added
@sentry/vue 29.41 kB added added
@sentry/vue (incl. Tracing) 43.52 kB added added
@sentry/svelte 24.97 kB added added
CDN Bundle 27.48 kB added added
CDN Bundle (incl. Tracing) 42.46 kB added added
CDN Bundle (incl. Tracing, Replay) 79.17 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 84.58 kB added added
CDN Bundle - uncompressed 80.51 kB added added
CDN Bundle (incl. Tracing) - uncompressed 125.89 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 242.43 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 255.22 kB added added
@sentry/nextjs (client) 46.29 kB added added
@sentry/sveltekit (client) 42.07 kB added added
@sentry/node-core 51.81 kB added added
@sentry/node 162.06 kB added added
@sentry/node - without tracing 93.25 kB added added
@sentry/aws-serverless 108.75 kB added added

@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

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 8,874 - - added
GET With Sentry 1,797 20% - added
GET With Sentry (error only) 6,049 68% - added
POST Baseline 1,214 - - added
POST With Sentry 595 49% - added
POST With Sentry (error only) 1,060 87% - added
MYSQL Baseline 3,326 - - added
MYSQL With Sentry 508 15% - added
MYSQL With Sentry (error only) 2,690 81% - added

@Lms24
Copy link
Member Author

Lms24 commented Jan 12, 2026

needs one more rebase after #18771 is merged

Ready

I accidentally left a hard-coded SDK version in a test recently added by
me. This PR fixes that so that CI doesn't break on the next release


Closes #18772 (added automatically)
@Lms24 Lms24 force-pushed the prepare-release/10.33.0 branch from 10fa35e to 99d5597 Compare January 12, 2026 11:14
…18773)

Accidentally added a wrong import when finishing work in #17708
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@Lms24 Lms24 force-pushed the prepare-release/10.33.0 branch from 99d5597 to 1630389 Compare January 12, 2026 11:40
@Lms24 Lms24 merged commit b7fe9bf into master Jan 12, 2026
205 checks passed
@Lms24 Lms24 deleted the prepare-release/10.33.0 branch January 12, 2026 11:58
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.