sunkai-cai commented on a change in pull request #1967:
URL: 
https://github.com/apache/shardingsphere-elasticjob/pull/1967#discussion_r700460635



##########
File path: 
elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-boot-starter/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/boot/job/ElasticJobBootstrapConfiguration.java
##########
@@ -95,10 +95,30 @@ private void constructJobBootstraps(final 
ElasticJobProperties elasticJobPropert
         }
     }
     
+    private void jobExtraConfigurations(final JobConfiguration jobConfig, 
final TracingConfiguration<?> tracingConfig) {
+        if (null == tracingConfig) {
+            return;
+        }
+        TracingProperties tracingProperties = 
applicationContext.getBean(TracingProperties.class);
+        Preconditions.checkArgument(null == 
tracingProperties.getIncludeJobNames()
+                || null == tracingProperties.getExcludeJobNames(),
+                "[tracing.includeJobNames] and [tracing.excludeJobNames] are 
mutually exclusive.");
+        if (null == tracingProperties.getIncludeJobNames() && null == 
tracingProperties.getExcludeJobNames()) {
+            jobConfig.getExtraConfigurations().add(tracingConfig);
+        } else if (null != tracingProperties.getIncludeJobNames()) {
+            if 
(tracingProperties.getIncludeJobNames().contains(jobConfig.getJobName())) {
+                jobConfig.getExtraConfigurations().add(tracingConfig);
+            }
+        } else if (null != tracingProperties.getExcludeJobNames()
+                && 
!tracingProperties.getExcludeJobNames().contains(jobConfig.getJobName())) {
+            jobConfig.getExtraConfigurations().add(tracingConfig);
+        }

Review comment:
       Ok, I try it.




-- 
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