public OtSpan(Trace trace, OtSpanKind spanKind, Dictionary <string, string> tags)
        {
            _spanKind = spanKind;
            Trace     = trace;
            Context   = new OtSpanContext(trace);

            if (tags != null)
            {
                foreach (var entry in tags)
                {
                    SetZipkinTag(entry.Key, entry.Value);
                }
            }
        }
Ejemplo n.º 2
0
        public ISpanBuilder AddReference(string referenceType, ISpanContext referencedContext)
        {
            if (referencedContext == null)
            {
                return(this);
            }

            // Only one reference is supported for now.
            if (_parent != null)
            {
                return(this);
            }

            if (referenceType == References.ChildOf || referenceType == References.FollowsFrom)
            {
                _parent = (OtSpanContext)referencedContext;
            }

            return(this);
        }