Skip to content

Commit

Permalink
[GOBBLIN-2161] Read logExporter classname from config property (#4063)
Browse files Browse the repository at this point in the history
  • Loading branch information
khandelwal-prateek authored and Will-Lo committed Oct 3, 2024
1 parent 6597980 commit a6a2f72
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ protected MetricExporter initializeMetricExporter(State state) {
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);
Expand Down

0 comments on commit a6a2f72

Please sign in to comment.