Skip to content
Enabling Application Insights telemetry on an ASP.NET Core web applications
C# HTML CSS JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src More updates Feb 18, 2020
LICENSE Initial commit Feb 18, 2020
README.md More updates Feb 20, 2020

README.md

aspnet-ai

Sample code on how to enable Application Insights telemetry on an ASP.NET Core web applications.

Fore more information, visit: Adding Application Insights telemetry to your ASP.NET Core website | HildenCo

Running

This repo contains 3 solutions:

  • Simple Application Insights demo
  • Suppressing Telemetry on Application Insights demo
  • Simple Alert based on Application Insights demo

Simple Application Insights demo

To run the base version, use the code available on master branch:

git clone https://github.com/hd9/aspnet-ai.git
cd aspnet-ai/src
# add your instrumentation key to src/appSettings.Development.json
dotnet run

Simple Telemetry demo

To run the version that suppresses telemetry, run the code available on the telemetry branch:

git clone https://github.com/hd9/aspnet-ai.git
git checkout telemetry
cd aspnet-ai/src
# add your instrumentation key to src/appSettings.Development.json
dotnet run

Simple Alert demo

To run the version that produces Application Insights alerts, run the code available on the alerts branch:

git clone https://github.com/hd9/aspnet-ai.git
git checkout alerts
cd aspnet-ai/src
# add your instrumentation key to src/appSettings.Development.json
dotnet run

Configuration

To work, this solution requires a valid Instrumentation Key on your appSettings.json.

Thanks!

And don't forget to visit blog.hildenco.com.

License

MIT

You can’t perform that action at this time.