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

Provide bundler/esbuild support and documentation #921

Open
davemyers-dev opened this issue Jul 9, 2024 · 0 comments
Open

Provide bundler/esbuild support and documentation #921

davemyers-dev opened this issue Jul 9, 2024 · 0 comments

Comments

@davemyers-dev
Copy link

Feature Enhancement Request

The current library is incredibly difficult to use in a modern Node project that utilizes esbuild for bundling. There is a brief section in the Splunk docs that mentions excluding express from bundling, but it is not sufficient for this library to work when using a bundler.

Several development practices in the library cause runtime errors when combined with esbuild including:

  1. Using relative path imports/requires
  2. Dynamically loading packages
    const Instrumentation = load(desc.module, desc.name);
  3. Providing native binaries

Datadog provides an esbuild plugin to properly utilize their their OTEL trace wrapper library seen here:
https://github.com/DataDog/dd-trace-js/blob/master/packages/datadog-esbuild/index.js
https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/nodejs/#bundling

I would prefer to utilize the Splunk APM specific implementations of AlwaysOn Profiling and Runtime metrics, however, the lack of support, documentation, and community adoption makes this challenging. These challenges are not present when utilizing the OTEL-js libraries or auto-instrumentation directly.

Request:
To provide one the following:

  • A similar esbuild plugin that can be utilized with this library
  • First-class documentation that details the workarounds necessary to use this library with a bundler such as esbuild
  • Modules/Examples that can be utilized to feed appropriate profiler and metric data to splunk when using the OTEL libraries directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant