public static ITracerBuilder AddMetric(this ITracerBuilder traceBuilder) { if (traceBuilder == null) { throw new ArgumentNullException(nameof(traceBuilder)); } //if (actConfig == null) //{ // throw new ArgumentNullException(nameof(actConfig)); //} //ZipkinCollectorConfig cfg = new ZipkinCollectorConfig(); //actConfig(cfg); //cfg.Validate(); traceBuilder.AddCollector(new MetricCollector()); return(traceBuilder); }
public static ITracerBuilder AddZipkin(this ITracerBuilder traceBuilder, Action <ZipkinCollectorConfig> actConfig) { if (traceBuilder == null) { throw new ArgumentNullException(nameof(traceBuilder)); } if (actConfig == null) { throw new ArgumentNullException(nameof(actConfig)); } ZipkinCollectorConfig cfg = new ZipkinCollectorConfig(); actConfig(cfg); cfg.Validate(); traceBuilder.AddCollector(new ZipkinCollector(cfg)); return(traceBuilder); }