From 42f66f2c6f7df19fad910e6d6b7878c3c511ef32 Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Tue, 28 Feb 2023 09:34:43 +0100 Subject: [PATCH] Avoid recording metrics for http server endpoints while they contain resource IDs Closes #17281 --- quarkus/runtime/src/main/resources/application.properties | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/quarkus/runtime/src/main/resources/application.properties b/quarkus/runtime/src/main/resources/application.properties index 381afce771..2b7d7d0dca 100644 --- a/quarkus/runtime/src/main/resources/application.properties +++ b/quarkus/runtime/src/main/resources/application.properties @@ -9,6 +9,13 @@ quarkus.banner.enabled=false quarkus.health.extensions.enabled=false quarkus.datasource.health.enabled=false +# Disable http metrics binder as URL parameters are only shown with placeholders for '/resource' URLs, but not +# for '/admin' and '/realms'. Neither the IDs of entities nor the realm name should be part of the metric names +# to avoid an explosion of metric names which would lead to memory exhaustion in Keycloak and to a resource +# exhaustion in the connected monitoring systems. +# See https://github.com/keycloak/keycloak/issues/17281 for a discussion +quarkus.micrometer.binder.http-server.enabled=false + # Enables metrics from other extensions if metrics is enabled quarkus.datasource.metrics.enabled=${quarkus.micrometer.enabled}