Skip to content

Commit

Permalink
[JS SDK] Add docs for fsIntegration
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Aug 26, 2024
1 parent 4427b8c commit 2f1345c
Showing 1 changed file with 55 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` will create 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`.

0 comments on commit 2f1345c

Please sign in to comment.