open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.74k stars 803 forks source link

[otlp-exporter-base] refactor exporters to use a pluggable transport layer #4116

Open pichlermarc opened 1 year ago

pichlermarc commented 1 year ago

Is your feature request related to a problem? Please describe.

Currently, transport, configuration (options and environment variables) as well as serialization code are all mixed together in the OTLP exporters, making it increasingly hard to modify and test them. Further, a significant amount of logic and tests are duplicated across multiple OTLP exporters.

Describe the solution you'd like

This issue tracks refactoring the OTLP exporters so that the transport code is a pluggable component that takes a subset of the configuration passed to the exporter. This way we

This transport component should not directly access any environment variables mixed in with other code as is currently done in the exporter. Determining its configuration should happen before instantiation; a finished configuration object should be passed to it.

Out of scope for this issue:

Additional context

pichlermarc commented 1 year ago

I'm working on this; I'm starting with otlp/http protobuf exporters first.

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

pichlermarc commented 9 months ago

This is in progress #4151 does change the gRPC exporters, a draft for http is available in #4415.

pichlermarc commented 9 months ago

This is work in progress. Here's a list of things that need to be done:

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

pichlermarc commented 3 weeks ago

This issue ended up with a super-large scope. The essential parts of this are complete, but we have not exposed most of it to the end-user. I'm considering spinning off an issue that tracks this explicitly.