This is an automated email from the ASF dual-hosted git repository. apurtell pushed a commit to branch PHOENIX-7562-feature in repository https://gitbox.apache.org/repos/asf/phoenix.git
commit 7bad6941d58035eaeb18ed207d71ed0f69980b26 Author: Istvan Toth <st...@apache.org> AuthorDate: Thu May 8 17:02:24 2025 +0200 PHOENIX-7604 Log exceptions in GlobalClientMetrics static initializer (#2142) --- .../apache/phoenix/monitoring/GlobalClientMetrics.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/phoenix-core-client/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java b/phoenix-core-client/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java index f0f071cbcf..85671ac746 100644 --- a/phoenix-core-client/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java +++ b/phoenix-core-client/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java @@ -177,11 +177,16 @@ public enum GlobalClientMetrics { private GlobalMetric metric; static { - initPhoenixGlobalClientMetrics(); - if (isGlobalMetricsEnabled) { - MetricRegistry metricRegistry = createMetricRegistry(); - registerPhoenixMetricsToRegistry(metricRegistry); - GlobalMetricRegistriesAdapter.getInstance().registerMetricRegistry(metricRegistry); + try { + initPhoenixGlobalClientMetrics(); + if (isGlobalMetricsEnabled) { + MetricRegistry metricRegistry = createMetricRegistry(); + registerPhoenixMetricsToRegistry(metricRegistry); + GlobalMetricRegistriesAdapter.getInstance().registerMetricRegistry(metricRegistry); + } + } catch (Throwable t) { + LOGGER.error("Failed to initialize GlobalClientMetrics", t); + throw t; } }