Skip to content

Commit c964aa1

Browse files
committed
add docs
1 parent c2028cb commit c964aa1

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

docs/v8-node.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you want, you can use OpenTelemetry-native APIs to start spans, and Sentry wi
1515
We support the following Node Frameworks out of the box:
1616

1717
- [Express](#express)
18-
- Fastify
18+
- [Fastify](#fastify)
1919
- Koa
2020
- Nest.js
2121
- Hapi
@@ -101,3 +101,25 @@ Sentry.setupExpressErrorHandler(app);
101101

102102
app.listen(3000);
103103
```
104+
105+
## Fastify
106+
107+
The following shows how you can setup Fastify instrumentation in v8. This will capture performance data & errors for
108+
your Fastify app.
109+
110+
```js
111+
const Sentry = require('@sentry/node');
112+
113+
Sentry.init({
114+
dsn: '__DSN__',
115+
tracesSampleRate: 1,
116+
});
117+
118+
const { fastify } = require('fastify');
119+
const app = fastify();
120+
Sentry.setupFastifyErrorHandler(app);
121+
122+
// add routes etc. here
123+
124+
app.listen();
125+
```

0 commit comments

Comments
 (0)