Exemple #1
0
        public static ITracer GetTracer(string serviceName, ILoggerFactory loggerFactory, ISampler sampler, IReporter reporter)
        {
            var tracer = new Tracer.Builder(serviceName);

            if (!loggerFactory.IsNull())
            {
                tracer.WithLoggerFactory(loggerFactory);
            }
            if (!sampler.IsNull())
            {
                tracer.WithSampler(sampler);
            }
            if (!reporter.IsNull())
            {
                tracer.WithReporter(reporter);
            }

            return(tracer.Build());
        }