Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Work in this release was contributed by @kunal649 and @bardrop. Thank you for yo

HTTP spans that the SDK builds from a `URL` now send `url.scheme` without the trailing colon (`https` instead of `https:`) and `url.port` as a number instead of a string, as the Sentry conventions define them and as Node `http.server` spans already do. This changes `http.server` spans from `@sentry/cloudflare`, `Bun.serve`, Deno and Nitro, and outgoing `node:http` client spans. Update saved queries, alerts and dashboards that filter on `url.scheme:"https:"` or on `url.port` as a string.

- **fix(nuxt): Name the database system in `db.system.name` of db0 spans ([#26285](https://github.com/getsentry/sentry-javascript/pull/26285))**

Nitro database (db0) spans now set `db.system.name` to the database system of the connector's dialect (`mysql`, `postgresql` or `sqlite`), as the OpenTelemetry conventions define it, instead of the connector name. For example, spans of the `mysql2` and `planetscale` connectors now report `mysql`, and spans of `better-sqlite3` and `cloudflare-d1` now report `sqlite`. Update saved queries, alerts and dashboards that filter on the connector names.

## 11.12.0

### Important Changes
Expand Down
19 changes: 14 additions & 5 deletions dev-packages/e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,21 @@ is the reference setup.
values that come from its `init()` (`sdk.name`, default integrations) are Node-only. Next.js is different: it loads
`instrumentation.ts` on every runtime, so `nextjs-16` calls `init()` of `@sentry/nextjs` on Bun and Deno too. Its
Bun and Deno variants build the app on that runtime, so `@sentry/nextjs` loads its `bun` or `deno` entry, which adds
the integrations of `@sentry/bun` or `@sentry/deno`.
the integrations of `@sentry/bun` or `@sentry/deno`. Nuxt is similar: `@sentry/nuxt` bundles `sentry.server.config.ts`
into the Nitro output, so `nuxt-4` calls `init()` of `@sentry/nuxt` on Bun and Deno too. `sentry.server.config.bun.ts`
and `sentry.server.config.deno.ts` add the integrations of `@sentry/bun` or `@sentry/deno`. On Cloudflare, `nuxt-4`
builds with the `cloudflare_module` preset and sets up the SDK with `sentryCloudflareNitroPlugin`, which
`nuxt.config.ts` adds only for that runtime. Like the documented Cloudflare setup, that build has no
`sentry.server.config.ts`: a runtime-specific file can replace a file but not remove it, so the build command deletes
it. Nitro turns every file under `server/api` into a route, so
`nuxt.config.ts` lists the runtime-specific files there (such as `db-mongoose.cloudflare.ts`) in Nitro's `ignore`.
- **Start commands**: `playwright.config.mjs` selects the start command with `getRuntime()`. Bun and Deno use the same build
as Node and only change the start command, for example
`bun --bun --preload ./instrument.bun.mjs ./node_modules/@react-router/serve/bin.cjs ./build/server/index.js` and
`deno run -A --preload=@sentry/deno/import --preload=./instrument.deno.mjs ./node_modules/@react-router/serve/bin.cjs ./build/server/index.js`.
The app's `deno.json` maps `@sentry/deno/import` to `node_modules`, because the e2e dependencies are `file:` tarballs
that `npm:@sentry/deno/import` does not resolve.
that `npm:@sentry/deno/import` does not resolve. `nuxt-4` starts the Nitro output with no preload:
`bun .output/server/index.mjs` and `deno run -A .output/server/index.mjs`.
- **Cloudflare**: the app has the Cloudflare dependencies installed all the time. The Cloudflare build has its own
`vite.cloudflare.config.ts` with `@cloudflare/vite-plugin` and `sentryCloudflareVitePlugin` from
`@sentry/cloudflare/vite`, which the runner uses in place of `vite.config.ts` (see runtime-specific files). List the
Expand Down Expand Up @@ -211,9 +219,10 @@ is the reference setup.
`"deno-version": "v2.9.0"`.
- **Bun**: under `bun run` the SDK cannot inject diagnostics channels into packages that stay outside the build (for
example Express behind `react-router-serve`), so those produce no spans on Bun. Where a test depends on them, branch
on `RUNTIME` and say why in a comment. An app that starts its own server can instead bundle it with
`@sentry/bun/plugin`, as `nestjs-12/bun-build.mjs` does. Bun 1.3 renames classes in bundles (`class Foo2`), which
changes span names taken from class names, so `nestjs-12` pins Bun 1.4 (see #26289).
on `RUNTIME` and say why in a comment. `nuxt-4` builds with `bun --bun nuxt build` on Bun, because the Nitro
prerenderer loads its `bun-sqlite` connector in the build process. An app that starts its own server can instead
bundle it with `@sentry/bun/plugin`, as `nestjs-12/bun-build.mjs` does. Bun 1.3 renames classes in bundles
(`class Foo2`), which changes span names taken from class names, so `nestjs-12` pins Bun 1.4 (see #26289).

```json
"sentryTest": {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ declare const __E2E_TEST_TUNNEL__: boolean;

export default defineNitroPlugin(
sentryCloudflareNitroPlugin({
// The tunnel forwards to the DSN host, which is the event proxy in the tunnel variant.
dsn: __E2E_TEST_TUNNEL__ ? 'http://public@localhost:3031/1337' : 'https://public@dsn.ingest.sentry.io/1337',
tracesSampleRate: 1.0,
enableLogs: true,
tunnel: 'http://localhost:3031/', // proxy server
integrations: __E2E_TEST_TUNNEL__ ? [serveTunnelIntegration()] : [],
// Several tests trigger the same server error one after another, which Dedupe would drop.
integrations: integrations => [
...integrations.filter(integration => integration.name !== 'Dedupe'),
...(__E2E_TEST_TUNNEL__ ? [serveTunnelIntegration()] : []),
],
}),
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Simulates a v10-style `bun --preload` that fully initializes the SDK
// before the config bundled into the server build runs its own `Sentry.init`.
import { bunHttpServerIntegration } from '@sentry/bun';
import * as Sentry from '@sentry/nuxt';

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
tracesSampleRate: 1.0,
tunnel: 'http://localhost:3031/',
integrations: [bunHttpServerIntegration()],
});
Loading
Loading