コード例 #1
0
        public static TracerBuilder UseApplicationInsights(this TracerBuilder builder, Action <TelemetryConfiguration> configure)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }

            var configuration = new TelemetryConfiguration();

            configure(configuration);
            return(builder.SetExporter(new ApplicationInsightsTraceExporter(configuration)));
        }
コード例 #2
0
        public static TracerBuilder UseZipkin(this TracerBuilder builder, Action <ZipkinTraceExporterOptions> configure)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }

            var options = new ZipkinTraceExporterOptions();

            configure(options);
            return(builder.SetExporter(new ZipkinTraceExporter(options)));
        }