class ThreadLocalSpan {

  @Nullable public Span next(TraceContextOrSamplingFlags extracted) {
    Tracer tracer = tracer();
    if (tracer == null) return null;
    Span next = tracer.nextSpan(extracted);
    SpanAndScope spanAndScope = new SpanAndScope(next, tracer.withSpanInScope(next));
    getCurrentSpanInScopeStack().addFirst(spanAndScope);
    return next;
  }

    ThreadLocalSpan(Tracer tracer);

}