44 lines
2.1 KiB
Diff
44 lines
2.1 KiB
Diff
--- mysql-connector-j-8.4.0/src/main/core-impl/java/com/mysql/cj/NativeSession.java 2024-08-20 09:40:16.912267863 +0200
|
|
+++ mysql-connector-j-8.4.0/src/main/core-impl/java/com/mysql/cj/NativeSession.java 2024-08-20 10:15:54.394893409 +0200
|
|
@@ -37,7 +37,6 @@
|
|
import java.util.function.Supplier;
|
|
|
|
import com.mysql.cj.conf.HostInfo;
|
|
-import com.mysql.cj.conf.PropertyDefinitions.OpenTelemetry;
|
|
import com.mysql.cj.conf.PropertyKey;
|
|
import com.mysql.cj.conf.PropertySet;
|
|
import com.mysql.cj.conf.RuntimeProperty;
|
|
@@ -51,7 +50,6 @@
|
|
import com.mysql.cj.exceptions.OperationCancelledException;
|
|
import com.mysql.cj.interceptors.QueryInterceptor;
|
|
import com.mysql.cj.log.Log;
|
|
-import com.mysql.cj.otel.OpenTelemetryHandler;
|
|
import com.mysql.cj.protocol.ColumnDefinition;
|
|
import com.mysql.cj.protocol.NetworkResources;
|
|
import com.mysql.cj.protocol.ProtocolEntityFactory;
|
|
@@ -107,24 +105,7 @@
|
|
|
|
public NativeSession(HostInfo hostInfo, PropertySet propSet) {
|
|
super(hostInfo, propSet);
|
|
-
|
|
- // Check Telemetry option.
|
|
- RuntimeProperty<OpenTelemetry> openTelemetry = this.propertySet.getEnumProperty(PropertyKey.openTelemetry);
|
|
- if (openTelemetry.getValue() == OpenTelemetry.PREFERRED || openTelemetry.getValue() == OpenTelemetry.REQUIRED) {
|
|
- if (!OpenTelemetryHandler.isOpenTelemetryApiAvailable()) {
|
|
- if (openTelemetry.getValue() == OpenTelemetry.REQUIRED) {
|
|
- throw ExceptionFactory.createException(Messages.getString("Connection.OtelApiNotFound"));
|
|
- }
|
|
- if (openTelemetry.isExplicitlySet()) {
|
|
- getLog().logInfo(Messages.getString("Connection.OtelApiNotFound"));
|
|
- }
|
|
setTelemetryHandler(NoopTelemetryHandler.getInstance());
|
|
- } else {
|
|
- setTelemetryHandler(new OpenTelemetryHandler());
|
|
- }
|
|
- } else {
|
|
- setTelemetryHandler(NoopTelemetryHandler.getInstance());
|
|
- }
|
|
}
|
|
|
|
public void connect(HostInfo hi, String user, String password, String database, int loginTimeout, TransactionEventHandler transactionManager)
|