|
44 | 44 | import static datadog.trace.api.config.TraceInstrumentationConfig.INSTRUMENTATION_CONFIG_ID; |
45 | 45 | import static datadog.trace.api.config.TraceInstrumentationConfig.INTEGRATIONS_ENABLED; |
46 | 46 | import static datadog.trace.api.config.TraceInstrumentationConfig.JAX_RS_ADDITIONAL_ANNOTATIONS; |
| 47 | +import static datadog.trace.api.config.TraceInstrumentationConfig.JDBC_CLIENT_INFO_FETCHING_ENABLED; |
47 | 48 | import static datadog.trace.api.config.TraceInstrumentationConfig.JDBC_CONNECTION_CLASS_NAME; |
| 49 | +import static datadog.trace.api.config.TraceInstrumentationConfig.JDBC_METADATA_FETCHING_ENABLED; |
48 | 50 | import static datadog.trace.api.config.TraceInstrumentationConfig.JDBC_POOL_WAITING_ENABLED; |
49 | 51 | import static datadog.trace.api.config.TraceInstrumentationConfig.JDBC_PREPARED_STATEMENT_CLASS_NAME; |
50 | 52 | import static datadog.trace.api.config.TraceInstrumentationConfig.MEASURE_METHODS; |
@@ -132,6 +134,8 @@ public class InstrumenterConfig { |
132 | 134 | private final String jdbcPreparedStatementClassName; |
133 | 135 | private final String jdbcConnectionClassName; |
134 | 136 | private final boolean jdbcPoolWaitingEnabled; |
| 137 | + private final boolean jdbcMetadataFetchingEnabled; |
| 138 | + private final boolean jdbcClientInfoFetchingEnabled; |
135 | 139 |
|
136 | 140 | private final String httpURLConnectionClassName; |
137 | 141 | private final String axisTransportClassName; |
@@ -245,6 +249,9 @@ private InstrumenterConfig() { |
245 | 249 | configProvider.getString(JDBC_PREPARED_STATEMENT_CLASS_NAME, ""); |
246 | 250 | jdbcConnectionClassName = configProvider.getString(JDBC_CONNECTION_CLASS_NAME, ""); |
247 | 251 | jdbcPoolWaitingEnabled = configProvider.getBoolean(JDBC_POOL_WAITING_ENABLED, false); |
| 252 | + jdbcMetadataFetchingEnabled = configProvider.getBoolean(JDBC_METADATA_FETCHING_ENABLED, true); |
| 253 | + jdbcClientInfoFetchingEnabled = |
| 254 | + configProvider.getBoolean(JDBC_CLIENT_INFO_FETCHING_ENABLED, true); |
248 | 255 |
|
249 | 256 | httpURLConnectionClassName = configProvider.getString(HTTP_URL_CONNECTION_CLASS_NAME, ""); |
250 | 257 | axisTransportClassName = configProvider.getString(AXIS_TRANSPORT_CLASS_NAME, ""); |
@@ -425,6 +432,14 @@ public boolean isJdbcPoolWaitingEnabled() { |
425 | 432 | return jdbcPoolWaitingEnabled; |
426 | 433 | } |
427 | 434 |
|
| 435 | + public boolean isJdbcMetadataFetchingEnabled() { |
| 436 | + return jdbcMetadataFetchingEnabled; |
| 437 | + } |
| 438 | + |
| 439 | + public boolean isJdbcClientInfoFetchingEnabled() { |
| 440 | + return jdbcClientInfoFetchingEnabled; |
| 441 | + } |
| 442 | + |
428 | 443 | public String getHttpURLConnectionClassName() { |
429 | 444 | return httpURLConnectionClassName; |
430 | 445 | } |
@@ -636,6 +651,10 @@ public String toString() { |
636 | 651 | + '\'' |
637 | 652 | + ", jdbcPoolWaitingEnabled=" |
638 | 653 | + jdbcPoolWaitingEnabled |
| 654 | + + ", jdbcMetadataFetchingEnabled=" |
| 655 | + + jdbcMetadataFetchingEnabled |
| 656 | + + ", jdbcClientInfoFetchingEnabled=" |
| 657 | + + jdbcClientInfoFetchingEnabled |
639 | 658 | + ", httpURLConnectionClassName='" |
640 | 659 | + httpURLConnectionClassName |
641 | 660 | + '\'' |
|
0 commit comments