public static ISpanBuilder BeginSpan() { var traceReporter = Configuration.Reporter; if (traceReporter == null) { return(new FakeSpanBuilder()); } var pooledSpan = spanPool.AcquireHandle(); var contextScope = TraceContextScope.Begin(); return(new SpanBuilder(traceReporter, pooledSpan, contextScope, configuration)); }
public static IDisposable Use(TraceContext context) { return(TraceContextScope.Begin(context)); }