/// <summary> /// Initializes a new instance of the <see cref="ZipkinExporter"/> class. /// </summary> /// <param name="options">Configuration options.</param> /// <param name="client">Http client to use to upload telemetry.</param> public ZipkinExporter(ZipkinExporterOptions options, HttpClient client = null) { this.options = options ?? throw new ArgumentNullException(nameof(options)); #if !NET452 this.maxPayloadSizeInBytes = (!options.MaxPayloadSizeInBytes.HasValue || options.MaxPayloadSizeInBytes <= 0) ? ZipkinExporterOptions.DefaultMaxPayloadSizeInBytes : options.MaxPayloadSizeInBytes.Value; #endif this.httpClient = client ?? new HttpClient(); }
/// <summary> /// Initializes a new instance of the <see cref="ZipkinExporter"/> class. /// </summary> /// <param name="options">Configuration options.</param> /// <param name="client">Http client to use to upload telemetry.</param> public ZipkinExporter(ZipkinExporterOptions options, HttpClient client = null) { this.options = options; this.LocalEndpoint = this.GetLocalZipkinEndpoint(); this.httpClient = client ?? new HttpClient(); }