tracing-java
tracing-java copied to clipboard
span completion should not return the completed span
By returning the completed span we require execution to be traced regardless of whether it will be observed. We can avoid this additional work when tracing is not requested. The solution to #34 should cover this case.
Potential non-break (API bend?): completeSpan returns an optional of the completed span, we may be able to return an empty optional when the trace is not observed.
Isn't this the reason why we have fastCompleteSpan too?