use of com.amazon.ion.SpanProvider in project ion-java by amzn.
the class Spans method currentSpan.
/**
* Attempts to get a {@link Span} from the given object, if it
* supports {@link SpanProvider#currentSpan()}.
*
* @param spanProvider may be null.
* @return null if there's not a current span.
*/
public static Span currentSpan(Object spanProvider) {
SpanProvider sp = asFacet(SpanProvider.class, spanProvider);
Span span = (sp == null ? null : sp.currentSpan());
return span;
}
Aggregations