in src/Relecloud.Web.CallCenter.Api/Startup.cs [192:214]
private void AddOpenTelemetry(IServiceCollection services, string appInsightsConnectionString)
{
services.AddOpenTelemetry()
.UseAzureMonitor(o => o.ConnectionString = appInsightsConnectionString)
.WithMetrics(metrics =>
{
metrics.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddRuntimeInstrumentation();
})
.WithTracing(tracing =>
{
tracing.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddRedisInstrumentation()
.AddSqlClientInstrumentation(o =>
{
o.SetDbStatementForText = true;
o.SetDbStatementForStoredProcedure = true;
})
.AddSource("Azure.*");
});
}