This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/5.1 by this push: new c38614bef5 PHOENIX-7604 Log exceptions in GlobalClientMetrics static initializer (#2142) c38614bef5 is described below commit c38614bef5b15f9146ab7c16a7576c553dd50b94 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/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java index 4a2dacd688..d544883fa2 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/monitoring/GlobalClientMetrics.java @@ -131,11 +131,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; } }