feat(node): Add fsInstrumentation
(#13291)
This release adds fsIntegration
, an integration that instruments the fs
API to the Sentry Node SDK. The
integration creates spans with naming patterns of fs.readFile
, fs.unlink
, and so on.
This integration is not enabled by default and needs to be registered in your Sentry.init
call. You can configure
via options whether to include path arguments or error messages as span attributes when an fs call fails:
Sentry.init({
integrations: [
Sentry.fsIntegration({
recordFilePaths: true,
recordErrorMessagesAsSpanAttributes: true,
}),
],
});
WARNING: This integration may add significant overhead to your application. Especially in scenarios with a lot of
file I/O, like for example when running a framework dev server, including this integration can massively slow down
your application.