Commit 32fff151 authored by 杨锐's avatar 杨锐

针对非主流ExecutorService traceId问题处理。

parent 4a6d0577
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>commons-parent</artifactId> <artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<version>0.2.6</version> <version>0.2.6.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -11,4 +11,6 @@ import java.util.concurrent.*; ...@@ -11,4 +11,6 @@ import java.util.concurrent.*;
public interface ITechExecutorServiceBuilder { public interface ITechExecutorServiceBuilder {
ExecutorService buildExecutorService(ExecutorService executorService); ExecutorService buildExecutorService(ExecutorService executorService);
Runnable wrap(Runnable task);
} }
...@@ -18,4 +18,9 @@ public class TechExecutorServiceBuilderNoTrace implements ITechExecutorServiceBu ...@@ -18,4 +18,9 @@ public class TechExecutorServiceBuilderNoTrace implements ITechExecutorServiceBu
log.info("构建ExecutorServiceNoTrace"); log.info("构建ExecutorServiceNoTrace");
return executorService; return executorService;
} }
@Override
public Runnable wrap(Runnable task) {
return task;
}
} }
...@@ -22,4 +22,17 @@ public class TechExecutorServiceBuilderTrace implements ITechExecutorServiceBuil ...@@ -22,4 +22,17 @@ public class TechExecutorServiceBuilderTrace implements ITechExecutorServiceBuil
CurrentTraceContext mdcCurrentTraceContext = MDCCurrentTraceContext.create(); CurrentTraceContext mdcCurrentTraceContext = MDCCurrentTraceContext.create();
return mdcCurrentTraceContext.executorService(executorService); return mdcCurrentTraceContext.executorService(executorService);
} }
/**
* 针对非主流ExecutorService终极解决方案
*
* @param task
* @return
*/
@Override
public Runnable wrap(Runnable task) {
log.info("wrap Runnable 4 support trace");
CurrentTraceContext mdcCurrentTraceContext = MDCCurrentTraceContext.create();
return mdcCurrentTraceContext.wrap(task);
}
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>commons-parent</artifactId> <artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<version>0.2.6</version> <version>0.2.6.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>commons-parent</artifactId> <artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<version>0.2.6</version> <version>0.2.6.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>commons-parent</artifactId> <artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<version>0.2.6</version> <version>0.2.6.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>commons-parent</artifactId> <artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<version>0.2.6</version> <version>0.2.6.2</version>
</parent> </parent>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<artifactId>enoch-agent-spring-boot-starter</artifactId> <artifactId>enoch-agent-spring-boot-starter</artifactId>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>commons-parent</artifactId> <artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<version>0.2.6</version> <version>0.2.6.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<artifactId>commons-parent</artifactId> <artifactId>commons-parent</artifactId>
<version>0.2.6</version> <version>0.2.6.2</version>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<lombok.version>1.16.20</lombok.version> <lombok.version>1.16.20</lombok.version>
<guava.version>23.0</guava.version> <guava.version>23.0</guava.version>
<apollo.client.version>0.10.2</apollo.client.version> <apollo.client.version>0.10.2</apollo.client.version>
<common.parent.version>0.2.6</common.parent.version> <common.parent.version>0.2.6.2</common.parent.version>
</properties> </properties>
<dependencies> <dependencies>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>commons-parent</artifactId> <artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<version>0.2.6</version> <version>0.2.6.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment