- How to Integrate Monitoring into Your Application
- How to Integrate Logging into Your Application
Table of contents
Getting Started
- Create an account: Get started by creating a free account. Sign Up
- ApiKey: Get your account ApiKey
- Client Secret: A client secret is unique to a product and environment. Create or use an existing product, then create or use an existing environment. View Your Products
ASP.Net Core
Monitoring
Add ClearInsights Monitoring– Program.cs
builder.Services.AddClearInsightsMonitor(configuration =>
{
configuration.ApiKey = "{ApiKey}";
configuration.Secret = "{Environment Client Secret}";
configuration.ApplicationName = "{Application Name}";
});
.Net Core
Logging
Add ClearInsights Logger – Program.cs
using IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
// Add to capture performance metrics with the Monitoring product
services.AddClearInsightsMonitor(configuration =>
{
configuration.ApiKey = "{ApiKey}";
configuration.Secret = "{Environment Client Secret}";
configuration.ApplicationName = "{Application Name}";
});
})
.Build();
