micrometer-metrics / tracing

Provides tracing abstractions over tracers and tracing system reporters.
https://micrometer.io
Apache License 2.0
252 stars 46 forks source link

Make OtelSpan public instead of package-private #808

Closed ThomasVitale closed 2 months ago

ThomasVitale commented 3 months ago

The OtelSpan class implementing the Span interface is package private, which makes it not possible to act on the underlying OpenTelemetry Span object (unless Reflection is used). One use case for this would be to add structured events to a Span (necessary until https://github.com/micrometer-metrics/micrometer/issues/5238 is implemented).

That is different from the BraveSpan class, which is set as public.

Is it possible to make OtelSpan public in the 1.3.x release line?

ThomasVitale commented 3 months ago

In case the feature request is accepted, I drafted a PR to align the visibility of OtelSpan to the one of BridgeSpan. https://github.com/micrometer-metrics/tracing/pull/809