internal TracerDecoration( OnSpanLog onSpanLog, OnSpanSetTag onSpanSetTag, OnSpanFinished onSpanFinished, OnSpanStarted onSpanStarted, OnSpanActivated onSpanActivated, OnSpanStartedWithFinishCallback onSpanStartedWithFinishCallback) { this.onSpanLog = onSpanLog; this.onSpanSetTag = onSpanSetTag; this.onSpanFinished = onSpanFinished; this.onSpanStarted = onSpanStarted; this.onSpanActivated = onSpanActivated; this.onSpanStartedWithFinishCallback = onSpanStartedWithFinishCallback; }
public ColoredConsoleTracerDecoration( ColorChooser colorChooser, LogSerializer logSerializer, TextFormatter textFormatter, SetTagSerializer setTagSerializer, bool outputDurationOnFinished) { this.colorChooser = colorChooser; this.logSerializer = logSerializer; this.textFormatter = textFormatter; this.setTagSerializer = setTagSerializer; this.outputDurationOnFinished = outputDurationOnFinished; if (this.outputDurationOnFinished) { onSpanStarted = (span, operationName) => { span.SetBaggageItem(startTimestampBaggageKey, DateTimeOffset.UtcNow.Ticks.ToString()); }; } }
public TracerDecoratorBuilder OnSpanStarted(OnSpanStarted onSpanStarted) { _onSpanStarteds.Add(onSpanStarted); return(this); }