Skip to content

Commit 6fad030

Browse files
authored
docs(nuxt): Add Nuxt's Nitro features (#15286)
Adds entries on the newly added and available Nitro instrumented features released in `10.17.0` and `10.21.0`.
1 parent 733f75a commit 6fad030

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: Nitro Server Features
3+
description: "Learn which Nitro server features are automatically instrumented by the Sentry Nuxt SDK."
4+
---
5+
6+
The Sentry Nuxt SDK automatically instruments various Nitro server APIs to provide performance monitoring and error tracking for your server-side code.
7+
8+
## Server Middleware
9+
10+
<Alert>Available from version `@sentry/nuxt` 10.17.0 and up.</Alert>
11+
12+
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.
13+
14+
## Cache
15+
16+
<Alert>Available from version `@sentry/nuxt` 10.21.0 and up.</Alert>
17+
18+
The Sentry Nuxt SDK automatically instruments [cache APIs](https://nitro.build/guide/cache) for the following Nitro functions:
19+
20+
- `defineCachedEventHandler`
21+
- `cachedEventHandler`
22+
- `cachedFunction`
23+
24+
This provides spans in your transactions that represent cache operations and their durations, including cache hits.
25+
26+
## Storage
27+
28+
<Alert>Available from version `@sentry/nuxt` 10.21.0 and up.</Alert>
29+
30+
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.
31+
32+
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.
33+
34+
## Database
35+
36+
<Alert>Available from version `@sentry/nuxt` 10.21.0 and up.</Alert>
37+
38+
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.
39+
40+
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`.

0 commit comments

Comments
 (0)