add: tlog

This commit is contained in:
2024-08-30 16:59:41 +08:00
parent 416ad65751
commit 6afccdc7a6
2 changed files with 15 additions and 2 deletions

View File

@@ -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();
}
}

View File

@@ -58,8 +58,8 @@ spring:
queueTimeout: 100
executors: # 动态线程池配置,都有默认值,采用默认值的可以不配置该项,减少配置量
- threadPoolName: cool_pool # 线程池名称必填dtpExecutor1
threadPoolAliasName: core_thread # 线程池别名,可选
executorType: common # 线程池类型 common、eager、ordered、scheduled、priority默认 common
threadPoolAliasName: core_thread # 线程池别名,可选
executorType: common # 线程池类型 common、eager、ordered、scheduled、priority默认 common
corePoolSize: 30 # 核心线程数默认1
maximumPoolSize: 50 # 最大线程数默认cpu核数
queueCapacity: 1024 # 队列容量默认1024
@@ -161,3 +161,5 @@ lucene:
tlog:
pattern: "[$preApp][$preIp][$spanId][$traceId]"
enable-invoke-time-print: true
id-generator: org.nl.config.TlogIdGenerator