add: tlog
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
package org.nl.config;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.yomahub.tlog.id.TLogIdGenerator;
|
||||||
|
|
||||||
|
public class TlogIdGenerator extends TLogIdGenerator {
|
||||||
|
@Override
|
||||||
|
public String generateTraceId() {
|
||||||
|
return IdUtil.getSnowflake(1, 1).nextIdStr();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -58,8 +58,8 @@ spring:
|
|||||||
queueTimeout: 100
|
queueTimeout: 100
|
||||||
executors: # 动态线程池配置,都有默认值,采用默认值的可以不配置该项,减少配置量
|
executors: # 动态线程池配置,都有默认值,采用默认值的可以不配置该项,减少配置量
|
||||||
- threadPoolName: cool_pool # 线程池名称,必填dtpExecutor1
|
- threadPoolName: cool_pool # 线程池名称,必填dtpExecutor1
|
||||||
threadPoolAliasName: core_thread # 线程池别名,可选
|
threadPoolAliasName: core_thread # 线程池别名,可选
|
||||||
executorType: common # 线程池类型 common、eager、ordered、scheduled、priority,默认 common
|
executorType: common # 线程池类型 common、eager、ordered、scheduled、priority,默认 common
|
||||||
corePoolSize: 30 # 核心线程数,默认1
|
corePoolSize: 30 # 核心线程数,默认1
|
||||||
maximumPoolSize: 50 # 最大线程数,默认cpu核数
|
maximumPoolSize: 50 # 最大线程数,默认cpu核数
|
||||||
queueCapacity: 1024 # 队列容量,默认1024
|
queueCapacity: 1024 # 队列容量,默认1024
|
||||||
@@ -161,3 +161,5 @@ lucene:
|
|||||||
tlog:
|
tlog:
|
||||||
pattern: "[$preApp][$preIp][$spanId][$traceId]"
|
pattern: "[$preApp][$preIp][$spanId][$traceId]"
|
||||||
enable-invoke-time-print: true
|
enable-invoke-time-print: true
|
||||||
|
id-generator: org.nl.config.TlogIdGenerator
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user