Provides a simple IActivityMonitor
output client to pass monitoring data to
Microsoft Azure Application Insights.
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
- Add a NuGet feed to your project:
https://www.myget.org/F/bcrosnier/api/v3/index.json
- Install the
CK.ActivityMonitor.ApplicationInsights
NuGet package in your ASP.NET website project
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.
- Windows
- Powershell
- .NET Core SDK 2.0 (with .NET Core 2.0)
- Visual Studio 2017 (any edition) with .NET framework build tools
- Clone the repository
- In Powershell, run
CodeCakeBuilder/Bootstrap.ps1
- Run
CodeCakeBuilder/bin/Release/CodeCakeBuilder.exe
Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.
Assets in this repository are licensed with the MIT License. For more information, please see LICENSE.md.
This repository and its components use the following open-source projects:
- Invenietis/CK-Core, licensed under the GNU Lesser General Public License v3.0
- Invenietis/CK-Text, licensed under the MIT License
- Invenietis/CK-ActivityMonitor, licensed under the GNU Lesser General Public License v3.0
- Microsoft Azure Application Insights, licensed under the MIT License