示例#1
0
        public ISpan Start()
        {
            lock (_lock)
            {
                ISpanContext parentContext = GetParentContext();
                Span         ddSpan        = _tracer.DatadogTracer.StartSpan(_operationName, parentContext, _serviceName, _start, _ignoreActiveSpan);
                var          otSpan        = new OpenTracingSpan(ddSpan);

                if (_tags != null)
                {
                    foreach (var pair in _tags)
                    {
                        otSpan.SetTag(pair.Key, pair.Value);
                    }
                }

                return(otSpan);
            }
        }
 public OpenTracingScope(Scope scope)
 {
     _wrappedScope = scope;
     _wrappedSpan  = new OpenTracingSpan(scope.Span);
 }