public void BeforeRequest(object request, Context context)
        {
            ISpanBuilder spanBuilder = _tracer.BuildSpan(OperationName)
                                       .WithTag(Tags.SpanKind.Key, Tags.SpanKindClient);

            if (_ignoreActiveSpan)
            {
                spanBuilder.IgnoreActiveSpan();
            }

            // No need to put 'span' in Context, as our ScopeManager
            // will automatically propagate it, even when switching between threads,
            // and will be available when AfterResponse() is called.
            spanBuilder.StartActive(true);
        }
示例#2
0
 public virtual ISpanBuilder IgnoreActiveSpan()
 {
     _spanBuilder.IgnoreActiveSpan(); return(this);
 }