Skip to content

Commit

Permalink
[JS SDK] Add docs for fsIntegration (#11144)
Browse files Browse the repository at this point in the history
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
  • Loading branch information
lforst and Lms24 authored Aug 27, 2024
1 parent 094e1f3 commit c8fa1e0
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 0 deletions.
55 changes: 55 additions & 0 deletions docs/platforms/javascript/common/configuration/integrations/fs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: FileSystem
description: "Adds instrumentation for filesystem operations."
supported:
- javascript.node
- javascript.aws-lambda
- javascript.azure-functions
- javascript.connect
- javascript.express
- javascript.fastify
- javascript.gcp-functions
- javascript.hapi
- javascript.koa
- javascript.nestjs
- javascript.electron
- javascript.nextjs
- javascript.nuxt
- javascript.sveltekit
- javascript.remix
- javascript.astro
- javascript.bun
---

<Alert level="info">

This integration only works in the Node.js and Bun runtimes.

</Alert>

_Import name: `Sentry.fsIntegration`_

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.

<Alert level="warning" title="Potential Performance Overhead">
The `fsIntegration` may add significant overhead to your application.
Especially in scenarios with a lot of file I/O, like for example when you are
running a framework dev server, including this integration can massively slow
down your application.
</Alert>

## Options

### `recordFilePaths`

_Type: `boolean | undefined`_

Setting this option to `true` will include any filepath arguments from your `fs` API calls as span attributes.
Defaults to `false`.

### `recordErrorMessagesAsSpanAttributes`

_Type: `boolean | undefined`_

Setting this option to `true` will include the error messages of failed `fs` API calls as a span attribute.
Defaults to `false`.
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r
| [`anrIntegration`](./anr) | || | |
| [`localVariablesIntegration`](./localvariables) | || | |
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@
| [`requestDataIntegration`](./requestdata) | | || |
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@
| [`extraErrorDataIntegration`](./extraerrordata) | | | ||
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@
| [`requestDataIntegration`](./requestdata) | | || |
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Depending on whether an integration enhances the functionality of a particular r
| [`anrIntegration`](./anr) | || | |
| [`localVariablesIntegration`](./localvariables) | || | |
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||

### Edge Integrations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
| [`rewriteFramesIntegration`](./rewriteframes) | || | |
| [`sessionTimingIntegration`](./sessiontiming) | | | ||
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r
| [`anrIntegration`](./anr) | || | |
| [`localVariablesIntegration`](./localvariables) | || | |
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r
| [`anrIntegration`](./anr) | || | |
| [`localVariablesIntegration`](./localvariables) | || | |
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ Depending on whether an integration enhances the functionality of a particular r
| [`anrIntegration`](./anr) | || | |
| [`localVariablesIntegration`](./localvariables) | || | |
| [`nodeProfilingIntegration`](./nodeprofiling) | | || |
| [`fsIntegration`](./fs) | | || |
| [`trpcMiddleware`](./trpc) | ||||

0 comments on commit c8fa1e0

Please sign in to comment.