internal static LambdaSpan CreateSpan(string operationName, DateTimeOffset timestamp, IDictionary <string, object> tags, LambdaSpan parentSpan, string guid) { var span = new LambdaSpan(operationName, timestamp, tags, parentSpan, guid); LambdaSpanContext context = new LambdaSpanContext(span); span.SetContext(context); return(span); }
internal static LambdaSpan CreateRootSpan(string operationName, DateTimeOffset timestamp, IDictionary <string, object> tags, string guid, ILogger logger = null) { if (logger == null) { logger = new MockLogger(); } var rootSpan = new LambdaRootSpan(operationName, timestamp, tags, guid, new DataCollector(logger, false), new TransactionState(), new PrioritySamplingState(), new DistributedTracingState()); LambdaSpanContext context = new LambdaSpanContext(rootSpan); rootSpan.SetContext(context); return(rootSpan); }