Skip to content

OTLP Exporter builder issues #1592

@cijothomas

Description

@cijothomas

Methods like install_batch created unintended side-effects https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-otlp/src/span.rs#L143-L150

  1. It sets global providers, which may not be what user has intended.
  2. It returns a tracer with instrumentation scope set to "opentelemetry-otlp", which is incorrect as well.

The builder methods used in OTLP to setup the pipeline must be revisited to ensure that there are no accidental side effects like above. Also, returning tracer with hardcoded name is defeating the purpose of instrumentation scope, as all tracers will have same scope (and that too incorrect one). This is particularly hard when used with tracer-opentelemetry, as it'll result in traces which all have same scope!

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomershackathonTemp label for https://switzerland2025.hack-commit-pu.sh/help wantedGood for taking. Extra help will be provided by maintainers/approvers

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions