internal WavefrontSpan( WavefrontTracer tracer, string operationName, WavefrontSpanContext spanContext, DateTime startTimestampUtc, IList <Reference> parents, IList <Reference> follows, IList <KeyValuePair <string, string> > tags) { this.tracer = tracer; this.operationName = operationName; this.spanContext = spanContext; this.startTimestampUtc = startTimestampUtc; this.parents = parents; this.follows = follows; this.tags = tags; }
internal WavefrontSpan( WavefrontTracer tracer, string operationName, WavefrontSpanContext spanContext, DateTime startTimestampUtc, IList <Reference> parents, IList <Reference> follows, IList <KeyValuePair <string, string> > tags) { this.tracer = tracer; this.operationName = operationName; this.spanContext = spanContext; this.startTimestampUtc = startTimestampUtc; this.parents = parents; this.follows = follows; this.spanLogs = new List <SpanLog>(); IList <KeyValuePair <string, string> > globalTags = tracer.Tags; if ((globalTags == null || globalTags.Count == 0) && (tags == null || tags.Count == 0)) { this.tags = null; } else { this.tags = new List <KeyValuePair <string, string> >(); } this.singleValuedTags = null; if (globalTags != null) { foreach (var tag in globalTags) { SetTagObject(tag.Key, tag.Value); } } if (tags != null) { foreach (var tag in tags) { SetTagObject(tag.Key, tag.Value); } } spansDiscarded = tracer.SdkMetricsRegistry?.Counter("spans.discarded"); }
/// <summary> /// Initializes a new instance of the <see cref="WavefrontSpanBuilder"/> class. /// </summary> /// <param name="operationName">The operation name.</param> /// <param name="tracer">The tracer.</param> public WavefrontSpanBuilder(string operationName, WavefrontTracer tracer) { this.operationName = operationName; this.tracer = tracer; }