Exemple #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app)
        {
            //注册中间件
            AppMetricsConfiger.UseMiddleware(app);

            app.UseMvcWithDefaultRoute();
        }
Exemple #2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            //AppMetrics 初始化注册
            AppMetricsConfiger.AddService(services, configuration);

            services.AddMvc().AddMetrics();
        }