示例#1
0
 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))));
 }
示例#2
0
 public DelegateExporter(OnProcessFunc onProcess,
                         OnFinishFunc onShutdown)
 {
     _func   = onProcess;
     _finish = onShutdown;
 }