internal static ISpan StartSpan( SpanContext context, SpanOptions options, string name, SpanKind spanKind, ISpanId parentSpanId, ITraceParams traceParams, IStartEndHandler startEndHandler, Timer timestampConverter) { var span = new Span( context, options, name, spanKind, parentSpanId, traceParams, startEndHandler, timestampConverter); // Call onStart here instead of calling in the constructor to make sure the span is completely // initialized. if (span.IsRecordingEvents) { startEndHandler.OnStart(span); } return(span); }
internal static ISpan StartSpan( ISpanContext context, SpanOptions options, string name, ISpanId parentSpanId, bool?hasRemoteParent, ITraceParams traceParams, IStartEndHandler startEndHandler, ITimestampConverter timestampConverter, IClock clock ) { var span = new Span( context, options, name, parentSpanId, hasRemoteParent, traceParams, startEndHandler, timestampConverter, clock); // Call onStart here instead of calling in the constructor to make sure the span is completely // initialized. if (span.Options.HasFlag(SpanOptions.RECORD_EVENTS)) { startEndHandler.OnStart(span); } return(span); }
internal static ISpan StartSpan( Activity activity, Tracestate tracestate, SpanKind spanKind, ITraceParams traceParams, IStartEndHandler startEndHandler, bool ownsActivity = true) { var span = new Span( activity, tracestate, spanKind, traceParams, startEndHandler, ownsActivity); // Call onStart here instead of calling in the constructor to make sure the span is completely // initialized. if (span.IsRecordingEvents) { startEndHandler.OnStart(span); } return(span); }