Appinsights ASP.Net- Non http apps / background apps / any newer version of console app


Regardless of web / console / service app that you're running, you typically calling the same piece of code  which is teletmetry client, TrackMetric() for example and pass in the required parameter.

The only difference is how to create your Startup code (entry point) code and started setting up your telemetry client)

For web, you need only a single package


   

For function app v2, you need



   
   
   

And configure your FunctionsStartup, using the following codes :-



For console app, the package required is here :-


   
   


You need the following startup code (which you easy create using dotnet new worker)






Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm