Exemple #1
0
        protected SpanBase(TracerBase tracer, SpanContextBase spanContext, string operationName, DateTime?startTimestamp)
        {
            if (tracer == null)
            {
                throw new ArgumentNullException(nameof(tracer));
            }

            if (spanContext == null)
            {
                throw new ArgumentNullException(nameof(spanContext));
            }

            if (string.IsNullOrWhiteSpace(operationName))
            {
                throw new ArgumentNullException(nameof(operationName));
            }

            _tracer       = tracer;
            _typedContext = spanContext;
            OperationName = operationName;
            Duration      = new SpanDuration(spanContext.Clock, startTimestamp);
        }
Exemple #2
0
 protected SpanBaseWithDetails(TracerBase tracer, SpanContextBase spanContext, string operationName, DateTime?startTimestamp)
     : base(tracer, spanContext, operationName, startTimestamp)
 {
 }