diff --git a/docs/platforms/javascript/guides/nuxt/features/nitro-server-features.mdx b/docs/platforms/javascript/guides/nuxt/features/nitro-server-features.mdx new file mode 100644 index 0000000000000..60306dd165e6b --- /dev/null +++ b/docs/platforms/javascript/guides/nuxt/features/nitro-server-features.mdx @@ -0,0 +1,40 @@ +--- +title: Nitro Server Features +description: "Learn which Nitro server features are automatically instrumented by the Sentry Nuxt SDK." +--- + +The Sentry Nuxt SDK automatically instruments various Nitro server APIs to provide performance monitoring and error tracking for your server-side code. + +## Server Middleware + +Available from version `@sentry/nuxt` 10.17.0 and up. + +The Sentry Nuxt SDK automatically instruments [server middleware handlers](https://nuxt.com/docs/4.x/guide/directory-structure/server#server-middleware) in addition to server event handlers. This includes the handler functions and their `onBeforeResponse` and `onRequest` callbacks. + +## Cache + +Available from version `@sentry/nuxt` 10.21.0 and up. + +The Sentry Nuxt SDK automatically instruments [cache APIs](https://nitro.build/guide/cache) for the following Nitro functions: + +- `defineCachedEventHandler` +- `cachedEventHandler` +- `cachedFunction` + +This provides spans in your transactions that represent cache operations and their durations, including cache hits. + +## Storage + +Available from version `@sentry/nuxt` 10.21.0 and up. + +The Sentry Nuxt SDK automatically instruments [storage APIs](https://nuxt.com/docs/4.x/guide/directory-structure/server#server-storage) (also known as KV storage) and common operations. + +Keep in mind that only the storage mounts configured under `nitro.storage` in your `nuxt.config.ts` will be instrumented. Storage spans will show up in a similar way to [cache](#cache) spans since they both utilize the same underlying Nitro storage API. + +## Database + +Available from version `@sentry/nuxt` 10.21.0 and up. + +The Sentry Nuxt SDK automatically instruments Nitro's [database API](https://nitro.build/guide/database). This provides spans in your transactions that represent database query operations and their durations, enabling you to identify slow queries, track query frequency, and optimize your database interactions. + +Database instrumentation only applies to database mounts configured under `nitro.database` in your `nuxt.config.ts` and only when `nitro.experimental.database` is set to `true`.