{"name":"@opentelemetry/instrumentation-fs","version":"0.42.0","keywords":["fs","instrumentation","nodejs","opentelemetry","profiling","tracing"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/instrumentation-fs@0.42.0","maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"overbalance","email":"overbalancedev@proton.me"},{"name":"npmjs-account","email":"npmjs-account@opentelemetry.io"},{"name":"trentm","email":"trentm@gmail.com"},{"name":"martinkuba","email":"martin@martinkuba.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-fs#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-contrib/issues"},"dist":{"shasum":"4fc3ef8fea93e4d0a8345941c6ef02e23a712b06","tarball":"http://registry-npm.ywwl.com/@opentelemetry/instrumentation-fs/download/@opentelemetry/instrumentation-fs-0.42.0.tgz","fileCount":21,"integrity":"sha512-i6ytsmm8m9dJxpVg5PlaTMPc/rJfqroPWHZ9YAo5o+1mE8KN04Q33Aahiqs/gKtfaQUXJVxIrREyFg9dUUwcyA==","signatures":[{"sig":"MEUCIQCUDQdShihax7EWQVXetSHTfxhD63jERt+lCdEAzAUwJAIgDScoGQ42+SeMlBaUZEbL6+0CTodBU/e2U4oXbuPK+1c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCfwnu11UDmW/tDkXwTGgmk+wm4VyGMAstG6R9zka+CUgIhAIJ7np3RvJiS2N5KEKQXLob0HBniSUbxRcmCV0duObzD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2finstrumentation-fs@0.42.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":74429,"size":15536,"noattachment":false,"key":"/@opentelemetry/instrumentation-fs/-/@opentelemetry/instrumentation-fs-0.42.0.tgz"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":"^18.19.0 || >=20.6.0"},"gitHead":"cc263ac4e94320402ac3afe50d50eb00905e1bb8","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","test":"nyc --no-clean mocha 'test/**/*.test.ts'","clean":"rimraf build/*","compile":"tsc -p .","lint:readme":"node ../../scripts/lint-readme.js","prepublishOnly":"npm run compile","version:update":"node ../../scripts/version-update.js","compile:with-dependencies":"nx run-many -t compile -p @opentelemetry/instrumentation-fs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"84fcd7d0-fa01-4eb0-bc0e-678d4a7d7901"}},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-contrib.git","type":"git","directory":"packages/instrumentation-fs"},"_npmVersion":"lerna/9.0.7/node@v24.21.0+x64 (linux)","description":"OpenTelemetry instrumentation for `node:fs` file system interactions module","directories":{},"_nodeVersion":"24.21.0","dependencies":{"@opentelemetry/core":"^2.9.0","@opentelemetry/instrumentation":"^0.223.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@opentelemetry/api":"^1.3.0","@opentelemetry/resources":"^2.9.0","@opentelemetry/sdk-trace":"^2.9.0","@opentelemetry/context-async-hooks":"^2.9.0"},"peerDependencies":{"@opentelemetry/api":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/instrumentation-fs_0.42.0_1791300539066_0.34641754732655516","host":"s3://npm-registry-packages-npm-production"},"readme":"# OpenTelemetry `fs` Instrumentation for Node.js\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nThis module provides automatic instrumentation for the [`fs`](http://nodejs.org/dist/latest/docs/api/fs.html) module, which can be registered using the [`@opentelemetry/instrumentation`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation) package.\n\nCompatible with OpenTelemetry JS API `1.3+`.\n\nSee the full list of instrumented functions in [constants.ts](src/constants.ts);\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/instrumentation-fs\n```\n\n## Supported Versions\n\n- Node.js `>=22.15.0`\n\n## Usage\n\n```js\nconst { NodeSDK } = require('@opentelemetry/sdk-node');\nconst { FsInstrumentation } = require('@opentelemetry/instrumentation-fs');\n\nconst sdk = new NodeSDK({\n  instrumentations: [\n    new FsInstrumentation({\n      // see below for available configuration\n    }),\n  ],\n});\nsdk.start();\nprocess.once('beforeExit', async () => { await sdk.shutdown(); });\n```\n\n### Instrumentation Options\n\nYou can set the following:\n\n| Options             | Type                                                                                                | Description                                                                                                     |\n| ------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |\n| `createHook`        | `(functionName: FMember \\| FPMember, info: { args: ArrayLike<unknown> }) => boolean`                | Hook called before creating the span. If `false` is returned this and all the sibling calls will not be traced. |\n| `endHook`           | `( functionName: FMember \\| FPMember, info: { args: ArrayLike<unknown>; span: api.Span } ) => void` | Function called just before the span is ended. Useful for adding attributes.                                    |\n| `requireParentSpan` | `boolean`                                                                                           | Require parent to create fs span, default when unset is `false`.                                                |\n\n## Semantic Conventions\n\nThis package does not currently generate any attributes from semantic conventions.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>\n- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>\n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-fs\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-fs.svg\n","publish_time":1791300539163,"_cnpm_publish_time":1791300539163,"dist-tags":{"latest":"0.44.0"}}