public void RegisterExporter(TracerBuilder builder) { builder.UseZipkin(o => { o.ServiceName = _options.ServiceName; o.Endpoint = _options.Endpoint; o.TimeoutSeconds = _options.TimeoutSeconds; o.UseShortTraceIds = _options.UseShortTraceIds; }); }
public static void UseZipkinWithTraceOptions(this TracerBuilder builder, IServiceCollection services) { var options = services.BuildServiceProvider().GetService <ITraceExporterOptions>(); builder.UseZipkin(zipkinOptions => { zipkinOptions.Endpoint = new Uri(options.Endpoint); zipkinOptions.ServiceName = options.ServiceName; zipkinOptions.TimeoutSeconds = new TimeSpan(0, 0, options.TimeoutSeconds); zipkinOptions.UseShortTraceIds = options.UseShortTraceIds; }); }