Add support of Number type into Span.setAttribute(Spring, Number)
Is your feature request related to a problem? Please describe.
Currently Span class supports only primitive number types such as long, double, int.
It would be nice to have the support of the Number class because it will simplify the use of wrapper classes. It will not be necessary to cast wrappers to primitive types. Also, this casting may lead to precision loss.
Describe the solution you'd like
Have the following method setAttribute(Spring, Number) in the Span class to be able to set wrapper types without casting to primitives.
Describe alternatives you've considered
No response
Additional context
No response
Transferred issue to opentelemetry-java since this repository contains the Span class.
Our support for numbers (long, double, int) are only primitives, so we'd have to figure out what type the number is and cast down to the primitive type.
I think this is problematic for the reason @jkwatson described and for the precision problem that the submitter raised. Still might be possible. I wonder if it also raises a question about symmetry on the receiving/getting side.