Skip to content

amuratgencay/PostgreSQL.ApplicationInsights

Repository files navigation

PostgreSQL.ApplicationInsights

Tracking SQL dependencies with Application Insights

Usage Example:

private static ServiceProvider Setup(IConfiguration config)
{
    //setup our DI
    var serviceProvider = new ServiceCollection()
        .AddLogging(loggingBuilder =>
        {
            loggingBuilder.AddConfiguration(config.GetSection(LoggingSection));
            loggingBuilder.AddConsole();
        })
        .AddSingleton<ICategoryService, CategoryService>()
        .AddSingleton<IProductService, ProductService>()
        .AddSingleton<IMvcService, MvcService>()
        .AddSingleton<Browser>()
        .AddViews()
        .AddApplicationInsightsPostgreSQLTelemetryServices<SalesContext>(config)
        .BuildServiceProvider();


    return serviceProvider;
}

About

Tracking SQL dependencies with Application Insights

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages