From 916f6f175ad5ad9b6b0ac213edb690ec7c784d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Skogstad?= Date: Wed, 15 Jan 2025 11:10:21 +0100 Subject: [PATCH] add telemetry --- src/Digdir.Domain.Dialogporten.GraphQL/Program.cs | 3 +++ src/Digdir.Domain.Dialogporten.Service/Program.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/src/Digdir.Domain.Dialogporten.GraphQL/Program.cs b/src/Digdir.Domain.Dialogporten.GraphQL/Program.cs index f106411af..0dc823c97 100644 --- a/src/Digdir.Domain.Dialogporten.GraphQL/Program.cs +++ b/src/Digdir.Domain.Dialogporten.GraphQL/Program.cs @@ -86,6 +86,9 @@ static void BuildAndRun(string[] args) .AddControllers() .Services + //Telemetry + .AddDialogportenTelemetry(builder.Configuration, builder.Environment) + // Add health checks with the well-known URLs .AddAspNetHealthChecks((x, y) => x.HealthCheckSettings.HttpGetEndpointsToCheck = y .GetRequiredService>().Value? diff --git a/src/Digdir.Domain.Dialogporten.Service/Program.cs b/src/Digdir.Domain.Dialogporten.Service/Program.cs index addd46d71..21a76fa1d 100644 --- a/src/Digdir.Domain.Dialogporten.Service/Program.cs +++ b/src/Digdir.Domain.Dialogporten.Service/Program.cs @@ -51,6 +51,7 @@ static void BuildAndRun(string[] args) .WriteTo.OpenTelemetryOrConsole(context)); builder.Services + .AddDialogportenTelemetry(builder.Configuration, builder.Environment) .AddAzureAppConfiguration() .AddApplication(builder.Configuration, builder.Environment) .AddInfrastructure(builder.Configuration, builder.Environment)