In a recent PR, the OTel implementation of the Helidon neutral Tracer interface implementation of the unwrap method added checking of the Helidon wrapper object as well as the delegate.
But that change checks the wrapper first and the delegate second, which changes some behavior (such as unwrapping as Object and printing the unwrapped object's toString() value). This is also the opposite order that the pre-existing OpenTracing Tracerunwrap method checks the two objects.
Steps to reproduce
With the OTel tracing provider in use, invoke helidonTracer.unwrap(Object.class).toString() and you see the Helidon wrapper's value, not the delegate's value as before.
Environment Details
Problem Description
In a recent PR, the OTel implementation of the Helidon neutral
Tracer
interface implementation of theunwrap
method added checking of the Helidon wrapper object as well as the delegate.But that change checks the wrapper first and the delegate second, which changes some behavior (such as unwrapping as
Object
and printing the unwrapped object'stoString()
value). This is also the opposite order that the pre-existing OpenTracingTracer
unwrap
method checks the two objects.Steps to reproduce
With the OTel tracing provider in use, invoke
helidonTracer.unwrap(Object.class).toString()
and you see the Helidon wrapper's value, not the delegate's value as before.