public static TracerBuilder AddDelegateExporter(this TracerBuilder builder, OnProcessFunc onProcess, OnFinishFunc onShutdown = null) { return(builder.AddProcessorPipeline((cfg) => cfg.SetExporter(new DelegateExporter(onProcess, onShutdown)) .SetExportingProcessor(e => new SimpleSpanProcessor(e)))); }
public DelegateExporter(OnProcessFunc onProcess, OnFinishFunc onShutdown) { _func = onProcess; _finish = onShutdown; }