internal void OutputData( string fullCorrelationVector, OutputDataCategory outputDataCategory, string data) { var cVToOutput = fullCorrelationVector; if (this.FeatureFlags.ChopLastDigitOfCv) { // We exclude the last part, since that's used for the increment and to know what the NEXT child will be - we find it more natural to only show the user N-1 parts var cvLastPeriod = cVToOutput.LastIndexOf('.'); var cvMinusLast = cVToOutput.Substring(0, cvLastPeriod); cVToOutput = cvMinusLast; } if (!this.FeatureFlags.OutputTraceId) { var cvFirstPeriod = cVToOutput.IndexOf('.'); if (cvFirstPeriod == -1) { cVToOutput = string.Empty; } else { cVToOutput = cVToOutput.Substring(cvFirstPeriod); } } if (this.FeatureFlags.PrefixCvForOutput != null) { cVToOutput = this.FeatureFlags.PrefixCvForOutput + cVToOutput; } UpdateLongestCvStringLengthSeenSoFar(cVToOutput); this.writer.WriteLine($"{cVToOutput.PadRight(this.longestCvStringLengthSeenSoFar)} | {outputDataCategory.ToString().PadRight(MaxLengthOfOutputDataCategory)} | {data}"); }
private void OutputData(OutputDataCategory outputType, string data) { var cv = this.GetBaggageItem(Constants.CorrelationVectorKeyInBaggageItems); this.tracer.OutputData(cv, outputType, data); }