/// <summary> /// Registers LightStep exporter. /// </summary> /// <param name="builder">Trace builder to use.</param> /// <param name="configure">Configuration options.</param> /// <param name="processorConfigure">Span processor configuration.</param> /// <returns>The instance of <see cref="TracerBuilder"/> to chain the calls.</returns> public static TracerBuilder UseLightStep(this TracerBuilder builder, Action <LightStepTraceExporterOptions> configure, Action <SpanProcessorPipelineBuilder> processorConfigure) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } if (configure == null) { throw new ArgumentNullException(nameof(configure)); } if (processorConfigure == null) { throw new ArgumentNullException(nameof(processorConfigure)); } var options = new LightStepTraceExporterOptions(); configure(options); return(builder.AddProcessorPipeline(b => { b.SetExporter(new LightStepTraceExporter(options)); processorConfigure.Invoke(b); })); }
/// <summary> /// Registers LightStep exporter. /// </summary> /// <param name="builder">Trace builder to use.</param> /// <param name="configure">Configuration options.</param> /// <returns>The instance of <see cref="TracerBuilder"/> to chain the calls.</returns> public static TracerBuilder UseLightStep(this TracerBuilder builder, Action <LightStepTraceExporterOptions> configure) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } if (configure == null) { throw new ArgumentNullException(nameof(configure)); } var options = new LightStepTraceExporterOptions(); configure(options); return(builder.AddProcessorPipeline(b => b .SetExporter(new LightStepTraceExporter(options)) .SetExportingProcessor(e => new BatchingSpanProcessor(e)))); }
public TraceExporterHandler(LightStepTraceExporterOptions options, HttpClient client) { this.options = options; this.httpClient = client ?? new HttpClient(); this.httpClient.Timeout = this.options.SatelliteTimeout; }