Skip to content

Commit c8fa1e0

Browse files
Luca ForstnerLms24
andauthored
[JS SDK] Add docs for fsIntegration (#11144)
Co-authored-by: Lukas Stracke <[email protected]>
1 parent 094e1f3 commit c8fa1e0

File tree

12 files changed

+66
-0
lines changed

12 files changed

+66
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: FileSystem
3+
description: "Adds instrumentation for filesystem operations."
4+
supported:
5+
- javascript.node
6+
- javascript.aws-lambda
7+
- javascript.azure-functions
8+
- javascript.connect
9+
- javascript.express
10+
- javascript.fastify
11+
- javascript.gcp-functions
12+
- javascript.hapi
13+
- javascript.koa
14+
- javascript.nestjs
15+
- javascript.electron
16+
- javascript.nextjs
17+
- javascript.nuxt
18+
- javascript.sveltekit
19+
- javascript.remix
20+
- javascript.astro
21+
- javascript.bun
22+
---
23+
24+
<Alert level="info">
25+
26+
This integration only works in the Node.js and Bun runtimes.
27+
28+
</Alert>
29+
30+
_Import name: `Sentry.fsIntegration`_
31+
32+
The `fsIntegration` creates spans for `fs` API operations, like reading and writing files. The integration uses the [`@opentelemetry/instrumentation-fs`](https://www.npmjs.com/package/@opentelemetry/instrumentation-fs) package.
33+
34+
<Alert level="warning" title="Potential Performance Overhead">
35+
The `fsIntegration` may add significant overhead to your application.
36+
Especially in scenarios with a lot of file I/O, like for example when you are
37+
running a framework dev server, including this integration can massively slow
38+
down your application.
39+
</Alert>
40+
41+
## Options
42+
43+
### `recordFilePaths`
44+
45+
_Type: `boolean | undefined`_
46+
47+
Setting this option to `true` will include any filepath arguments from your `fs` API calls as span attributes.
48+
Defaults to `false`.
49+
50+
### `recordErrorMessagesAsSpanAttributes`
51+
52+
_Type: `boolean | undefined`_
53+
54+
Setting this option to `true` will include the error messages of failed `fs` API calls as a span attribute.
55+
Defaults to `false`.

platform-includes/configuration/integrations/javascript.astro.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r
6161
| [`anrIntegration`](./anr) | || | |
6262
| [`localVariablesIntegration`](./localvariables) | || | |
6363
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
64+
| [`fsIntegration`](./fs) | | || |
6465
| [`trpcMiddleware`](./trpc) | ||||

platform-includes/configuration/integrations/javascript.aws-lambda.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@
3333
| [`requestDataIntegration`](./requestdata) | | || |
3434
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
3535
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
36+
| [`fsIntegration`](./fs) | | || |
3637
| [`trpcMiddleware`](./trpc) | ||||

platform-includes/configuration/integrations/javascript.bun.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@
2929
| [`extraErrorDataIntegration`](./extraerrordata) | | | ||
3030
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
3131
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
32+
| [`fsIntegration`](./fs) | | || |
3233
| [`trpcMiddleware`](./trpc) | ||||

platform-includes/configuration/integrations/javascript.fastify.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@
3030
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
3131
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
3232
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
33+
| [`fsIntegration`](./fs) | | || |
3334
| [`trpcMiddleware`](./trpc) | ||||

platform-includes/configuration/integrations/javascript.gcp-functions.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@
3333
| [`requestDataIntegration`](./requestdata) | | || |
3434
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
3535
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
36+
| [`fsIntegration`](./fs) | | || |
3637
| [`trpcMiddleware`](./trpc) | ||||

platform-includes/configuration/integrations/javascript.nestjs.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@
3131
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
3232
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
3333
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
34+
| [`fsIntegration`](./fs) | | || |
3435
| [`trpcMiddleware`](./trpc) | ||||

platform-includes/configuration/integrations/javascript.nextjs.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Depending on whether an integration enhances the functionality of a particular r
6767
| [`anrIntegration`](./anr) | || | |
6868
| [`localVariablesIntegration`](./localvariables) | || | |
6969
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
70+
| [`fsIntegration`](./fs) | | || |
7071
| [`trpcMiddleware`](./trpc) | ||||
7172

7273
### Edge Integrations

platform-includes/configuration/integrations/javascript.node.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@
3131
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
3232
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
3333
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
34+
| [`fsIntegration`](./fs) | | || |
3435
| [`trpcMiddleware`](./trpc) | ||||

platform-includes/configuration/integrations/javascript.nuxt.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r
6161
| [`anrIntegration`](./anr) | || | |
6262
| [`localVariablesIntegration`](./localvariables) | || | |
6363
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
64+
| [`fsIntegration`](./fs) | | || |
6465
| [`trpcMiddleware`](./trpc) | ||||

platform-includes/configuration/integrations/javascript.remix.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r
6161
| [`anrIntegration`](./anr) | || | |
6262
| [`localVariablesIntegration`](./localvariables) | || | |
6363
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
64+
| [`fsIntegration`](./fs) | | || |
6465
| [`trpcMiddleware`](./trpc) | ||||

platform-includes/configuration/integrations/javascript.sveltekit.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r
6161
| [`anrIntegration`](./anr) | || | |
6262
| [`localVariablesIntegration`](./localvariables) | || | |
6363
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
64+
| [`fsIntegration`](./fs) | | || |
6465
| [`trpcMiddleware`](./trpc) | ||||

0 commit comments

Comments
 (0)