vscode enable application insights
Install nuget
dotnet add package Microsoft.ApplicationInsights.AspNetCore --version 2.7.0
Setup codes, startup.cs
public void ConfigureServices(IServiceCollection services) { // The following line enables Application Insights telemetry collection. services.AddApplicationInsightsTelemetry(); // code adding other services for your application services.AddMvc(); }
application.json
"ApplicationInsights": { "InstrumentationKey": "putinstrumentationkeyhere" },
In the section, "putInstrumentationkeyhere" ---
place the guid created for app insights in your portal.
Comments