private Tracer(IScopeManager scopeManager, IPropagator propagator, Options options, ISpanRecorder spanRecorder, ISplunkTracingHttpClient client) { ScopeManager = scopeManager; _spanRecorder = spanRecorder; _propagator = propagator; _options = options; _logger.Debug( $"Creating new tracer with GUID {_options.TracerGuid}. Project Access Token: {_options.AccessToken}, Report Period: {_options.ReportPeriod}, Report Timeout: {_options.ReportTimeout}."); var protocol = _options.Collector.UsePlaintext ? "http" : "https"; var url = $"{protocol}://{_options.Collector.CollectorHost}:{_options.Collector.CollectorPort}/{SplunkTracingConstants.CollectorReportPath}"; _httpClient = client ?? new SplunkTracingHttpClient(url, _options); _logger.Debug($"Tracer is reporting to {url}."); _reportLoop = new Timer(e => Flush(), null, TimeSpan.Zero, _options.ReportPeriod); _firstReportHasRun = false; }
public Tracer(Options options, ISpanRecorder spanRecorder, ISplunkTracingHttpClient client) : this( new AsyncLocalScopeManager(), Propagators.TextMap, options, spanRecorder, client) { }