public static TracerBuilder AddRequestCollector(this TracerBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder.AddCollector(t => new AspNetCoreCollector(t)));
        }
Пример #2
0
        public static TracerBuilder AddDependencyCollector(this TracerBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder
                   .AddCollector((t) => new AzureClientsCollector(t))
                   .AddCollector((t) => new AzurePipelineCollector(t))
                   .AddCollector((t) => new HttpClientCollector(t)));
        }
        public static TracerBuilder AddRequestCollector(this TracerBuilder builder, Action <AspNetCoreCollectorOptions> configure)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

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

            var options = new AspNetCoreCollectorOptions();

            configure(options);

            return(builder.AddCollector(t => new AspNetCoreCollector(t, options)));
        }
Пример #4
0
        public static TracerBuilder AddDependencyCollector(this TracerBuilder builder, Action <HttpClientCollectorOptions> configure)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

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

            var options = new HttpClientCollectorOptions();

            configure(options);

            return(builder
                   .AddCollector((t) => new AzureClientsCollector(t))
                   .AddCollector((t) => new AzurePipelineCollector(t))
                   .AddCollector((t) => new HttpClientCollector(t, options)));
        }
Пример #5
0
 public static TracerBuilder AddRebusCollectors(this TracerBuilder builder) =>
 builder
 .AddCollector(tracer => new RebusReceiveCollector(tracer))
 .AddCollector(tracer => new RebusSendCollector(tracer));