Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JS SDK] Add docs for fsIntegration #11144

Merged
merged 3 commits into from
Aug 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
lforst marked this conversation as resolved.
Show resolved Hide resolved

<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`.
Loading