From 919fb730d371ca5f7afe736ad313fc9bb7c67658 Mon Sep 17 00:00:00 2001 From: Nick Hill Date: Thu, 16 Nov 2023 15:10:39 -0800 Subject: [PATCH] fix: Per-model metrics labels should be disabled by default Motivation #90 introduced support for per-model prometheus metrics but the intention was not to change the default behaviour and have this as something enabled explicitly via configuration. However, it was inadvertently made the default. Modifications Change default behaviour to not include modelId/vModelId prometheus metric labels. This is important because model-mesh was designed primarily for use cases where there is a very large and changing number of individual models and those scenarios would result in a much greater number of individual metrics than prometheus can handle. Result Original behaviour restored Signed-off-by: Nick Hill --- src/main/java/com/ibm/watson/modelmesh/Metrics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ibm/watson/modelmesh/Metrics.java b/src/main/java/com/ibm/watson/modelmesh/Metrics.java index 7be788fe..981c4cb1 100644 --- a/src/main/java/com/ibm/watson/modelmesh/Metrics.java +++ b/src/main/java/com/ibm/watson/modelmesh/Metrics.java @@ -172,7 +172,7 @@ public PrometheusMetrics(Map params, Map infoMet int port = 2112; boolean shortNames = true; boolean https = true; - boolean perModelMetricsEnabled = true; + boolean perModelMetricsEnabled = false; String memMetrics = "all"; // default to all for (Entry ent : params.entrySet()) { switch (ent.getKey()) {