private WavefrontTracer(
            IReporter reporter, IList <KeyValuePair <string, string> > tags, IList <ISampler> samplers,
            ApplicationTags applicationTags, ISet <string> redMetricsCustomTagKeys,
            TimeSpan reportFrequency, PropagatorRegistry registry, ILoggerFactory loggerFactory)
        {
            ScopeManager  = new AsyncLocalScopeManager();
            this.reporter = reporter;
            Tags          = tags;
            this.samplers = samplers;
            this.redMetricsCustomTagKeys = redMetricsCustomTagKeys;
            this.applicationTags         = applicationTags;
            this.registry = registry;
            logger        = loggerFactory.CreateLogger <WavefrontTracer>();

            WavefrontSpanReporter spanReporter = GetWavefrontSpanReporter(reporter);

            if (spanReporter != null)
            {
                /*
                 * Tracing spans will be converted to metrics and histograms and will be reported
                 * to Wavefront only if you use the WavefrontSpanReporter.
                 */
                InitMetricsHistogramsReporting(spanReporter, applicationTags, reportFrequency,
                                               loggerFactory, out metricsRoot, out metricsScheduler, out heartbeaterService,
                                               out sdkMetricsRegistry);
            }
        }
 /// <summary>
 ///     Initializes a new instance of the <see cref="Builder"/> class.
 /// </summary>
 /// <param name="reporter">The reporter to report tracing spans with.</param>
 /// <param name="applicationTags">
 ///     Tags containing metadata about the application.
 /// </param>
 public Builder(IReporter reporter, ApplicationTags applicationTags)
 {
     this.reporter        = reporter;
     this.applicationTags = applicationTags;
     tags     = new List <KeyValuePair <string, string> >();
     samplers = new List <ISampler>();
     redMetricsCustomTagKeys = new HashSet <string>
     {
         SpanKind.Key
     };
     registry = new PropagatorRegistry();
 }