/// <summary> /// Creates a new set of options for the LightStep tracer. /// </summary> /// <param name="token">Project access token, if required.</param> public Options(string token = "") { Tags = InitializeDefaultTags(); ReportPeriod = TimeSpan.FromMilliseconds(5000); ReportTimeout = TimeSpan.FromSeconds(30); AccessToken = token; Satellite = new SatelliteOptions("collector.lightstep.com", 443, false); UseHttp2 = false; Run = true; ReportMaxSpans = int.MaxValue; Transport = TransportOptions.BinaryProto; EnableMetaEventLogging = false; ExceptionHandlerRegistered = false; }
/// <summary> /// Creates a new set of options for the LightStep tracer. /// </summary> /// <param name="token">Project API key.</param> /// <param name="tags">Tags to add to every span emitted from this tracer.</param> /// <param name="satelliteOptions">Satellite endpoint configuration.</param> /// <exception cref="ArgumentNullException">An API key is required.</exception> public Options(string token, IDictionary <string, object> tags, SatelliteOptions satelliteOptions) { if (string.IsNullOrWhiteSpace(token)) { throw new ArgumentNullException(nameof(token)); } Tags = tags.Count > 0 ? MergeTags(tags) : InitializeDefaultTags(); ReportPeriod = TimeSpan.FromMilliseconds(5000); ReportTimeout = TimeSpan.FromSeconds(30); AccessToken = token; Satellite = satelliteOptions; UseHttp2 = false; Run = true; }
public Options WithSatellite(SatelliteOptions options) { _logger.Debug($"Setting satellite to {options}"); Satellite = options; return(this); }
/// <summary> /// Creates a new set of options for the LightStep tracer. /// </summary> /// <param name="token">Project API Key.</param> /// <param name="satelliteOptions">Satellite endpoint configuration.</param> public Options(string token, SatelliteOptions satelliteOptions) : this(token, new Dictionary <string, object>(), satelliteOptions) { }