You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/09/01 18:25:18 UTC
[GitHub] [shardingsphere-elasticjob] sunkai-cai commented on a change in pull request #1967: Spring boot tracing filter
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org