Skip to content

Commit

Permalink
[INLONG-11349][Sort] Added enable.log.report configuration for connec…
Browse files Browse the repository at this point in the history
…tors
  • Loading branch information
qy-liuhuo committed Dec 10, 2024
1 parent 0a936e2 commit 22fa6f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,4 +469,10 @@ public final class Constants {
.withDescription(
"pulsar client auth params");

public static final ConfigOption<Boolean> ENABLE_LOG_REPORT =
ConfigOptions.key("enable.log.report")
.booleanType()
.defaultValue(false)
.withDescription("Whether enable openTelemetry log report or not.");

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.inlong.sort.mysql;

import org.apache.inlong.sort.base.Constants;
import org.apache.inlong.sort.base.metric.MetricOption;

import com.ververica.cdc.connectors.mysql.source.config.MySqlSourceOptions;
Expand Down Expand Up @@ -69,7 +70,7 @@ public DynamicTableSource createDynamicTableSource(Context context) {
final String username = config.get(USERNAME);
final String password = config.get(PASSWORD);
final String databaseName = config.get(DATABASE_NAME);
final Boolean enableLogReport = context.getConfiguration().get(ENABLE_LOG_REPORT);
final Boolean enableLogReport = context.getConfiguration().get(Constants.ENABLE_LOG_REPORT);
validateRegex(DATABASE_NAME.key(), databaseName);
final String tableName = config.get(TABLE_NAME);
validateRegex(TABLE_NAME.key(), tableName);
Expand Down Expand Up @@ -339,13 +340,6 @@ public Set<ConfigOption<?>> optionalOptions() {
+ "\"-U\" represents UPDATE_BEFORE.\n"
+ "\"+U\" represents UPDATE_AFTER.\n"
+ "\"-D\" represents DELETE.");

public static final ConfigOption<Boolean> ENABLE_LOG_REPORT =
ConfigOptions.key("enable.log.report")
.booleanType()
.defaultValue(false)
.withDescription("Whether enable openTelemetry log report or not.");

// ----------------------------------------------------------------------------
// experimental options, won't add them to documentation
// ----------------------------------------------------------------------------
Expand Down

0 comments on commit 22fa6f7

Please sign in to comment.