How to Integrate Monitoring into Your Application

This entry is part [part not set] of 2 in the series Getting Started With ClearInsights

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 MonitoringProgram.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();
Series Navigation

Leave a Reply

Discover more from ClearInsights

Subscribe now to keep reading and get access to the full archive.

Continue reading