FileSystem | Sentry for Next.js
Source URL: https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/fs
FileSystem | Sentry for Next.js
Section titled “FileSystem | Sentry for Next.js”This integration only works in the Node.js and Bun runtimes.
Import name: Sentry.fsIntegration
The fsIntegration creates spans for fs API operations, like reading and writing files. The integration uses the @opentelemetry/instrumentation-fs package.
Potential Performance Overhead
Section titled “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.
Sentry.init({ integrations: [Sentry.fsIntegration()],});Type: boolean | undefined
Setting this option to true will include any filepath arguments from your fs API calls as span attributes. Defaults to false.
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.