The `opentelemetry-node-bundler-plugin-utils` package provides a set of internal utilities specifically designed for developing OpenTelemetry bundler plugins. It is *not* intended for direct use by application developers, but rather as a dependency for other packages within the OpenTelemetry bundler plugin ecosystem. This library helps plugin authors with tasks like identifying installed OpenTelemetry instrumentations, parsing `package.json` dependencies, and creating `require` functions for specific contexts. Currently at version 0.7.0, its API should be considered unstable and subject to change before a 1.0.0 release. It forms a crucial foundational layer for other OpenTelemetry bundler plugins to achieve their instrumentation goals, offering shared logic to reduce duplication and ensure consistency across different plugin implementations.
npm install opentelemetry-node-bundler-plugin-utilsVerified import paths — ran on the pinned version, not inferred.
Demonstrates how a hypothetical OpenTelemetry bundler plugin might use `getOpenTelemetryInstrumentationList` and `getPackageJsonDependencies` to analyze a project's dependencies and identify relevant OpenTelemetry instrumentations for bundling.
Avoid direct consumption of this package. Instead, use official OpenTelemetry instrumentation libraries or bundler plugins that internally utilize this utility.
If you are a plugin developer using this directly (against advice), pin exact versions to avoid unexpected breakage. Regularly review the changelog for updates, especially before upgrading to new minor versions.
Ensure the `projectRoot` argument passed to utility functions accurately reflects the root directory of the application being bundled or analyzed. Test thoroughly in your specific build environment.
Run `npm install @opentelemetry/node-bundler-plugin-utils` or `yarn add @opentelemetry/node-bundler-plugin-utils`. Verify the import path is exactly as specified in documentation or package exports.
Ensure you are using named imports for functions like `getPackageJsonDependencies`: `import { getPackageJsonDependencies } from '@opentelemetry/node-bundler-plugin-utils';`Consult the package's source code or documentation (if available) to verify the correct names of exported symbols. Remember this is an internal utility, and its exports are not guaranteed to be stable or documented for public use.
No dependency data recorded yet.