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

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type