A recent PR added the ability to unwrap the OTel tracer as the Helidon Tracer wrapper (to the pre-existing ability to unwrap the OTel delegate tracer) by checking the wrapper first, then the delegate.
This broke previous behavior where users used unwrap(Object.class).toString() to display delegate information.
This PR reorders the checking in the OTel Tracer wrapper to restore the earlier behavior for unwrapping as Object while still adding the ability to unwrap as the wrapper (which was the purpose of this part of the earlier PR).
The PR also adds tests to make sure the older behavior works again.
Description
Resolves #8854
A recent PR added the ability to unwrap the OTel tracer as the Helidon
Tracer
wrapper (to the pre-existing ability to unwrap the OTel delegate tracer) by checking the wrapper first, then the delegate.This broke previous behavior where users used
unwrap(Object.class).toString()
to display delegate information.This PR reorders the checking in the OTel
Tracer
wrapper to restore the earlier behavior for unwrapping asObject
while still adding the ability to unwrap as the wrapper (which was the purpose of this part of the earlier PR).The PR also adds tests to make sure the older behavior works again.
Documentation
Bug fix; no doc impact.