Skip to content

CK.ActivityMonitor client for Azure Application Insights

License

Notifications You must be signed in to change notification settings

bcrosnier/CK-ActivityMonitor-ApplicationInsights

Repository files navigation

Application Insights handler for CK-ActivityMonitor

Provides a simple IActivityMonitor output client to pass monitoring data to Microsoft Azure Application Insights.

Usage

Requirements

Application Insights must be installed and configured on your ASP.NET website before using the IActivityMonitor client.

For more information: Set up Application Insights for your ASP.NET website

Install via NuGet

  1. Add a NuGet feed to your project: https://www.myget.org/F/bcrosnier/api/v3/index.json
  2. Install the CK.ActivityMonitor.ApplicationInsights NuGet package in your ASP.NET website project

Register the Application Insights ActivityMonitor client

At the start of your application, before creating ActivityMonitor instances, call the following code:

ActivityMonitor.AutoConfiguration += ( m ) =>
{
    m.Output.RegisterClient( new ApplicationInsightsClient() );
};

By default, log entries with a log level of Warn or above are tracked as trace logs.

This minimum log level of Warn can be configured through the client class' constructor with e.g. new ApplicationInsightsClient( LogLevel.Error ).

All exceptions are tracked, regardless of their log level.

Build requirements

Build instructions

  1. Clone the repository
  2. In Powershell, run CodeCakeBuilder/Bootstrap.ps1
  3. Run CodeCakeBuilder/bin/Release/CodeCakeBuilder.exe

Contributing

Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.

License

Assets in this repository are licensed with the MIT License. For more information, please see LICENSE.md.

Open-source licenses

This repository and its components use the following open-source projects:

About

CK.ActivityMonitor client for Azure Application Insights

Resources

License

Stars

Watchers

Forks

Packages

No packages published