768179367 commented on issue #1799:
URL: 
https://github.com/apache/shardingsphere-elasticjob/issues/1799#issuecomment-1008484835


   hello, you  can register a bean of TracingConfiguration<DataSource> to cover 
default DruidDataSourceWrapper
     `  @Bean
       public TracingConfiguration<DataSource> tracingConfiguration(final 
DataSource dataSource) {
           String className = 
"com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceWrapper";
           if (dataSource.getClass().getName().equals(className)) {
               DruidDataSource originDataSource = (DruidDataSource) dataSource;
               DruidDataSource selfDatasource = new DruidDataSource();
               //   set you datasource config
              selfDatasource.setDriver(originDataSource.getDriver());
              selfDatasource.setUrl(originDataSource.getUrl());
              selfDatasource.setUsername(originDataSource.getUsername());
              selfDatasource.setPassword(originDataSource.getPassword());
               return new TracingConfiguration<>(RDB, selfDatasource);
           }
           return new TracingConfiguration<>(RDB, dataSource);
       }`
   and   ### do not  have any config  in `application.yml`  about tarcing. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to