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

Allow loading @opentelemetry/winston-transport dynamically #2558

Open
harelmo-lumigo opened this issue Nov 27, 2024 · 0 comments
Open

Allow loading @opentelemetry/winston-transport dynamically #2558

harelmo-lumigo opened this issue Nov 27, 2024 · 0 comments

Comments

@harelmo-lumigo
Copy link

Is your feature request related to a problem? Please describe

Winston instrumentation assumes @opentelemetry/winston-transport is installed and attempts to resolve it using require, from a location adjacent to the application using Winston.
That limits the use-cases for packages wrapping the @opentelemetry/winston-instrumentation, as the transport cannot be provided via a different path or by some other dynamic loading method.

Describe the solution you'd like to see

Provide a constructor argument that will allow specifying the transport to be used, as an instance of OpenTelemetryTransportV3.

Describe alternatives you've considered

Alternatively, there can be either:

  1. an env-var respected by the instrumentation that points to the path from which the transport can be loaded
  2. a constructor argument with the path to load the transport from, instead of providing an instance
  3. a constructor argument with a function through which a transport instance can be obtained

Additional context

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant