From cbb7bfffc86f55afc5a76ab91d3fdaeb85d992f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Mon, 4 Mar 2024 09:51:33 +0100 Subject: [PATCH] fix: metrics were on all routes of control plane --- Control/Submitter/src/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/Submitter/src/Program.cs b/Control/Submitter/src/Program.cs index 4aaa745ee..3f23c9888 100644 --- a/Control/Submitter/src/Program.cs +++ b/Control/Submitter/src/Program.cs @@ -187,7 +187,7 @@ await func.Invoke() app.UseRouting(); app.UseGrpcWeb(); - app.UseOpenTelemetryPrometheusScrapingEndpoint(context => context.Connection.LocalPort == 1081); + app.UseOpenTelemetryPrometheusScrapingEndpoint(context => context.Connection.LocalPort == 1081 && context.Request.Path == "/metrics"); app.UseAuthorization(); app.UseSerilogRequestLogging();