|
4 | 4 |
|
5 | 5 | - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott |
6 | 6 |
|
| 7 | +Work in this release was contributed by @faizansaiyed123, @itisrmk, @kunal649, @kyrylolvov, @seongwon030, and @larcane97. Thank you for your contributions! |
| 8 | + |
7 | 9 | ### Important Changes |
8 | 10 |
|
9 | 11 | - **feat(nuxt): Start the server SDK on the Nuxt Vite server (experimental) ([#25524](https://github.com/getsentry/sentry-javascript/pull/25524))** |
|
12 | 14 |
|
13 | 15 | Development mode, Cloudflare, automatic capture of server rendering errors, and connecting server and browser traces via HTML meta tags are not yet supported. This experimental support may change in minor releases. |
14 | 16 |
|
15 | | -Work in this release was contributed by @faizansaiyed123, @itisrmk, @seongwon030, and @kyrylolvov. Thank you for your contributions! |
| 17 | +- **feat(cloudflare): Add incoming request span options to `httpServerIntegration`** |
| 18 | + |
| 19 | + Cloudflare's `httpServerIntegration` now accepts `ignoreIncomingRequests`, `ignoreStaticAssets`, `spans`, `onSpanCreated` and `onSpanEnd`, with the same meaning as in the Node, Deno and Bun integrations. The callbacks receive the web `Request`. |
| 20 | + |
| 21 | + `ignoreStaticAssets` defaults to `true`, so workers no longer create spans for `GET` requests to common static assets such as `favicon.ico`, `robots.txt` or `*.js` files. To keep these spans, set `httpServerIntegration({ ignoreStaticAssets: false })`. Request spans also follow the client's tracing configuration by default, so the SDK does not start them when tracing is disabled. If `ignoreRequestBody` throws, the request no longer fails, and the SDK skips the body. |
| 22 | + |
| 23 | +- **feat(node, bun, deno, cloudflare): Align portable exports across server SDKs** |
| 24 | + |
| 25 | + Node, Bun, Deno and Cloudflare now export the same helpers from `@sentry/core` and `@sentry/server-utils` where they work on that runtime: |
| 26 | + |
| 27 | + - Node and Bun now export `moduleMetadataIntegration`, `instrumentPostgresJsSql`, `instrumentCreateReactAgent`, `awsIntegration` and the `FlueOptions` type. `awsIntegration` was already in their default integrations. |
| 28 | + - Deno and Cloudflare now export `parameterize` and `instrumentStateGraphCompile`. |
| 29 | + - Bun and Cloudflare now export the `Log` and `LogSeverityLevel` types. |
| 30 | + - Deno now exports `fastifyIntegration`, which was already in its default integrations. |
| 31 | + |
| 32 | +- **feat(cloudflare): Let users configure the channel integrations** |
| 33 | + |
| 34 | + When the `@sentry/cloudflare/vite` plugin bundles an instrumented package (for example `pg` or `openai`), the SDK adds the matching integration with its default options. `@sentry/cloudflare` now exports these integrations, so you can set their options, for example in `instrument.server.ts`: |
| 35 | + |
| 36 | + ```ts |
| 37 | + export default Sentry.defineCloudflareOptions(env => ({ |
| 38 | + dsn: env.SENTRY_DSN, |
| 39 | + integrations: [Sentry.openAIIntegration({ recordInputs: false, recordOutputs: false })], |
| 40 | + })); |
| 41 | + ``` |
| 42 | + |
| 43 | + These integrations need the vite plugin. Without it, they record nothing, and with `debug: true` the SDK logs a warning. |
| 44 | + |
| 45 | +- **ref(deno, bun): Use a shared request handler wrapper for `Deno.serve` and `Bun.serve`** |
| 46 | + |
| 47 | + `Deno.serve` and `Bun.serve` now use the same request handler wrapper, which Cloudflare will also use. On both runtimes, errors in `OPTIONS` and `HEAD` requests now carry the request data, and the SDK keeps every `Set-Cookie` header of a response instead of only the last one. |
| 48 | + |
| 49 | + For Deno users: |
| 50 | + |
| 51 | + - When the source of a streamed response fails, the SDK now captures the error and marks the span as failed. |
| 52 | + - The SDK no longer reads a streamed response ahead of the client. |
| 53 | + |
| 54 | + `Bun.serve` spans now follow the Sentry conventions for `http.server` spans, as on Node, Deno and Cloudflare: |
| 55 | + |
| 56 | + - `url.template` is now `http.route`. Routes without parameters also get `http.route` and the `route` source. |
| 57 | + - `url.domain` is now `server.address`. |
| 58 | + - A request to `/` gets the `route` source and the name `GET /`. |
| 59 | + - Spans also get `user_agent.original` and `http.request.body.size`. |
16 | 60 |
|
17 | 61 | ## 11.9.0 |
18 | 62 |
|
@@ -203,6 +247,24 @@ Work in this release was contributed by @faizansaiyed123, @itisrmk, @seongwon030 |
203 | 247 |
|
204 | 248 | Work in this release was contributed by @4ktLuffy, @adityareddy-dev, @dasilvaluis, @faizansaiyed123, @jpdefo, @Jxxunnn, @mikamikasuki, @philipatkinson, @rubas, and @Shubham-Padkonde. Thank you for your contributions! |
205 | 249 |
|
| 250 | +- **feat(bun): Add incoming request options and request sessions to `bunServerIntegration`** |
| 251 | + |
| 252 | + `bunServerIntegration` now accepts the same options as `denoServeIntegration`: `ignoreRequestBody`, `ignoreIncomingRequests`, `ignoreStaticAssets`, `spans`, `onSpanCreated`, `onSpanEnd`, `sessions` and `sessionFlushingDelayMS`. The callbacks receive the web `Request`. |
| 253 | + |
| 254 | + `Bun.serve` now records a request session for each incoming request. Sessions are sent only when a `release` is set. To turn them off, set `bunServerIntegration({ sessions: false })`. |
| 255 | + |
| 256 | + `ignoreStaticAssets` defaults to `true`, so `Bun.serve` no longer creates spans for `GET` requests to common static assets such as `favicon.ico`, `robots.txt` or `*.js` files. To keep these spans, set `bunServerIntegration({ ignoreStaticAssets: false })`. `Bun.serve` spans also follow the client's tracing configuration by default, so the integration does not start spans when tracing is disabled. Errors thrown for `OPTIONS` and `HEAD` requests are now captured. |
| 257 | + |
| 258 | +- **feat(node): Add `onSpanEnd` to `httpIntegration`** |
| 259 | + |
| 260 | + `httpIntegration` and `httpServerSpansIntegration` now accept `onSpanEnd`, a hook that runs when the response for an incoming request finishes, before its span ends. Use it to change the span based on the response. Deno and Bun already have this option. |
| 261 | + |
| 262 | +- **feat(bun): Inject debug IDs and upload source maps in `sentryBunPlugin` ([#25670](https://github.com/getsentry/sentry-javascript/pull/25670))** |
| 263 | + |
| 264 | + `sentryBunPlugin` from `@sentry/bun/plugin` now accepts the same options as `sentryEsbuildPlugin` (`org`, `project`, `authToken`, `release`, `sourcemaps`, ...). When `Bun.build` writes source maps to `outdir`, the plugin injects the debug ID that Bun writes into each bundle, injects the release, and uploads the source maps at the end of the build. You no longer need to run `sentry sourcemap inject` and `sentry sourcemap upload` after the build. |
| 265 | + |
| 266 | + Like the other bundler plugins, `sentryBunPlugin` now sends build telemetry and injects the release it detects (for example, from git). To turn off telemetry, set `telemetry: false`. |
| 267 | + |
206 | 268 | ## 11.8.0 |
207 | 269 |
|
208 | 270 | ### Important Changes |
|
0 commit comments