diff --git a/src/BlazingPizza.Orders/Startup.cs b/src/BlazingPizza.Orders/Startup.cs index 1c44ae8..b970e17 100644 --- a/src/BlazingPizza.Orders/Startup.cs +++ b/src/BlazingPizza.Orders/Startup.cs @@ -12,6 +12,7 @@ using Microsoft.Extensions.Logging; using Microsoft.EntityFrameworkCore; using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.ApplicationInsights.Extensibility.EventCounterCollector; namespace BlazingPizza.Orders { @@ -31,6 +32,11 @@ public void ConfigureServices(IServiceCollection services) services.AddControllers(); services.AddGrpc(); services.AddApplicationInsightsTelemetry(Configuration); + + services.ConfigureTelemetryModule((module, options) => + { + module.Counters.Add(new EventCounterCollectionRequest("BlazingOrders.Pizza", "total-orders")); + }); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.