This is an automated email from the ASF dual-hosted git repository.

wlo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/gobblin.git


The following commit(s) were added to refs/heads/master by this push:
     new 4776135a83 [GOBBLIN-2161] Read logExporter classname from config 
property (#4063)
4776135a83 is described below

commit 4776135a83295af69a467cdf547679775ab6e44b
Author: Prateek Khandelwal <[email protected]>
AuthorDate: Thu Oct 3 11:16:10 2024 +0530

    [GOBBLIN-2161] Read logExporter classname from config property (#4063)
---
 .../src/main/java/org/apache/gobblin/metrics/OpenTelemetryMetrics.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/OpenTelemetryMetrics.java
 
b/gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/OpenTelemetryMetrics.java
index ce85b6ad89..349ae438d9 100644
--- 
a/gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/OpenTelemetryMetrics.java
+++ 
b/gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/OpenTelemetryMetrics.java
@@ -65,7 +65,8 @@ public class OpenTelemetryMetrics extends 
OpenTelemetryMetricsBase {
     if 
(state.getPropAsBoolean(ConfigurationKeys.METRICS_REPORTING_OPENTELEMETRY_LOGEXPORTER_ENABLED,
         
ConfigurationKeys.DEFAULT_METRICS_REPORTING_OPENTELEMETRY_LOGEXPORTER_ENABLED)) 
{
       try {
-        Class<?> clazz = 
Class.forName(ConfigurationKeys.METRICS_REPORTING_OPENTELEMETRY_LOGEXPORTER_CLASSNAME);
+        log.info("Initializing opentelemetry LogExporter class");
+        Class<?> clazz = 
Class.forName(state.getProp(ConfigurationKeys.METRICS_REPORTING_OPENTELEMETRY_LOGEXPORTER_CLASSNAME));
         Method instanceMethod = clazz.getMethod("instance");
         // Invoke the method to get the singleton instance
         return metricExporter = (MetricExporter) instanceMethod.invoke(null);

Reply via email to