Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d6c43b1e53
|
|
@ -1,22 +1,17 @@
|
|||
#skyWalking用户ID
|
||||
skywalking.user_id=123
|
||||
#skyWalking应用ID
|
||||
skywalking.application_id=test
|
||||
|
||||
#是否打印数据
|
||||
buriedpoint.printf=false
|
||||
#埋点异常的最大长度
|
||||
buriedpoint.max_exception_stack_length=4000
|
||||
#业务字段的最大长度
|
||||
buriedpoint.businesskey_max_length=300
|
||||
|
||||
#发送的最大长度
|
||||
sender.max_sender_length=8000
|
||||
#服务端的读取步长
|
||||
sender.read_step_length=256
|
||||
#最大消费线程数
|
||||
consumer.max_consumer=2
|
||||
#消费者最大等待时间
|
||||
consumer.max_wait_time=5
|
||||
#发送失败等待时间
|
||||
consumer.consumer_fail_retry_wait_interval=50
|
||||
#每个Buffer的最大个数
|
||||
buffer.buffer_max_size=18000
|
||||
#Buffer池的最大长度
|
||||
buffer.pool_size=5
|
||||
#最大发送者的连接数阀比例
|
||||
sender.connect_percent=100
|
||||
#当没有Sender时,尝试获取sender的等待周期
|
||||
|
|
@ -25,10 +20,19 @@ sender.retry_get_sender_wait_interval=2000
|
|||
sender.is_off=false
|
||||
#发送服务端配置
|
||||
sender.servers_addr=127.0.0.1:34000
|
||||
#埋点异常的最大长度
|
||||
buriedpoint.max_exception_stack_length=4000
|
||||
|
||||
#最大消费线程数
|
||||
consumer.max_consumer=2
|
||||
#消费者最大等待时间
|
||||
consumer.max_wait_time=5
|
||||
#发送失败等待时间
|
||||
consumer.consumer_fail_retry_wait_interval=50
|
||||
|
||||
#每个Buffer的最大个数
|
||||
buffer.buffer_max_size=18000
|
||||
#Buffer池的最大长度
|
||||
buffer.pool_size=5
|
||||
|
||||
#发送检查线程检查周期
|
||||
senderchecker.check_polling_time=200
|
||||
|
||||
#业务字段的最大长度
|
||||
businesskey.max_length=300
|
||||
|
|
@ -24,10 +24,10 @@ public final class BusinessKeyAppender {
|
|||
if (spanData == null) {
|
||||
return;
|
||||
}
|
||||
if (businessKey.length() <= Config.BusinessKey.MAX_LENGTH) {
|
||||
if (businessKey.length() <= Config.BuriedPoint.BUSINESSKEY_MAX_LENGTH) {
|
||||
spanData.setBusinessKey(businessKey);
|
||||
return;
|
||||
}
|
||||
spanData.setBusinessKey(businessKey.substring(0, Config.BusinessKey.MAX_LENGTH));
|
||||
spanData.setBusinessKey(businessKey.substring(0, Config.BuriedPoint.BUSINESSKEY_MAX_LENGTH));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,64 +2,60 @@ package com.ai.cloud.skywalking.conf;
|
|||
|
||||
public class Config {
|
||||
|
||||
public static class SkyWalking {
|
||||
public static String USER_ID;
|
||||
public static class SkyWalking {
|
||||
public static String USER_ID;
|
||||
|
||||
public static String APPLICATION_ID;
|
||||
}
|
||||
public static String APPLICATION_ID;
|
||||
}
|
||||
|
||||
public static class BuriedPoint {
|
||||
//是否打印埋点信息
|
||||
public static boolean PRINTF = false;
|
||||
public static class BuriedPoint {
|
||||
// 是否打印埋点信息
|
||||
public static boolean PRINTF = false;
|
||||
|
||||
public static int MAX_EXCEPTION_STACK_LENGTH = 4000;
|
||||
}
|
||||
public static int MAX_EXCEPTION_STACK_LENGTH = 4000;
|
||||
|
||||
public static class Consumer {
|
||||
//最大消费线程数
|
||||
public static int MAX_CONSUMER = 2;
|
||||
//消费者最大等待时间
|
||||
public static long MAX_WAIT_TIME = 5L;
|
||||
// Business Key 最大长度
|
||||
public static int BUSINESSKEY_MAX_LENGTH = 300;
|
||||
}
|
||||
|
||||
//
|
||||
public static long CONSUMER_FAIL_RETRY_WAIT_INTERVAL = 50L;
|
||||
}
|
||||
public static class Consumer {
|
||||
// 最大消费线程数
|
||||
public static int MAX_CONSUMER = 2;
|
||||
// 消费者最大等待时间
|
||||
public static long MAX_WAIT_TIME = 5L;
|
||||
|
||||
public static class Buffer {
|
||||
// 每个Buffer的最大个数
|
||||
public static int BUFFER_MAX_SIZE = 18000;
|
||||
//
|
||||
public static long CONSUMER_FAIL_RETRY_WAIT_INTERVAL = 50L;
|
||||
}
|
||||
|
||||
// Buffer池的最大长度
|
||||
public static int POOL_SIZE = 5;
|
||||
}
|
||||
public static class Buffer {
|
||||
// 每个Buffer的最大个数
|
||||
public static int BUFFER_MAX_SIZE = 18000;
|
||||
|
||||
public static class Sender {
|
||||
// 最大发送者的连接数阀比例
|
||||
public static int CONNECT_PERCENT = 50;
|
||||
// Buffer池的最大长度
|
||||
public static int POOL_SIZE = 5;
|
||||
}
|
||||
|
||||
// 发送服务端配置
|
||||
public static String SERVERS_ADDR;
|
||||
public static class Sender {
|
||||
// 最大发送者的连接数阀比例
|
||||
public static int CONNECT_PERCENT = 50;
|
||||
|
||||
// 是否开启发送
|
||||
public static boolean IS_OFF = false;
|
||||
// 发送服务端配置
|
||||
public static String SERVERS_ADDR;
|
||||
|
||||
// 发送的最大长度
|
||||
public static int MAX_SEND_LENGTH = 1800;
|
||||
// 是否开启发送
|
||||
public static boolean IS_OFF = false;
|
||||
|
||||
// 发送的最大长度
|
||||
public static int MAX_SEND_LENGTH = 1800;
|
||||
|
||||
public static long RETRY_GET_SENDER_WAIT_INTERVAL = 2000L;
|
||||
public static long RETRY_GET_SENDER_WAIT_INTERVAL = 2000L;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static class SenderChecker {
|
||||
public static class SenderChecker {
|
||||
|
||||
//检查周期时间
|
||||
public static long CHECK_POLLING_TIME = 200L;
|
||||
}
|
||||
|
||||
|
||||
public static class BusinessKey {
|
||||
//Business Key 最大长度
|
||||
public static int MAX_LENGTH = 300;
|
||||
}
|
||||
// 检查周期时间
|
||||
public static long CHECK_POLLING_TIME = 200L;
|
||||
}
|
||||
}
|
||||
|
|
@ -41,9 +41,7 @@ public class Config {
|
|||
public static int MAX_THREAD_NUMBER = 1;
|
||||
|
||||
// 定位文件时,每次读取偏移量跳过大小
|
||||
public static int OFFSET_FILE_SKIP_LENGTH = 2048;
|
||||
|
||||
// 每次读取文件偏移量大小
|
||||
public static int STEP_SIZE_FOR_LOCATING_FILE_OFFSET = 2048;
|
||||
|
||||
// 处理文件完成之后,等待时间
|
||||
public static long SWITCH_FILE_WAIT_TIME = 5000L;
|
||||
|
|
|
|||
|
|
@ -144,10 +144,10 @@ public class PersistenceThread extends Thread {
|
|||
FileRegisterEntry.FileRegisterEntryStatus.REGISTER));
|
||||
offset = 0;
|
||||
} else {
|
||||
char[] cha = new char[OFFSET_FILE_SKIP_LENGTH];
|
||||
char[] cha = new char[STEP_SIZE_FOR_LOCATING_FILE_OFFSET];
|
||||
int length = 0;
|
||||
while (length + OFFSET_FILE_SKIP_LENGTH < offset) {
|
||||
length += OFFSET_FILE_SKIP_LENGTH;
|
||||
while (length + STEP_SIZE_FOR_LOCATING_FILE_OFFSET < offset) {
|
||||
length += STEP_SIZE_FOR_LOCATING_FILE_OFFSET;
|
||||
bufferedReader.read(cha);
|
||||
}
|
||||
bufferedReader.read(cha, 0, Math.abs(offset - length));
|
||||
|
|
|
|||
|
|
@ -19,9 +19,7 @@ buffer.flush_number_of_cache=30
|
|||
#最大持久化的线程数量
|
||||
persistence.max_thread_number=3
|
||||
#定位文件时,每次读取偏移量跳过大小
|
||||
persistence.offset_file_skip_length=20480
|
||||
#每次读取文件偏移量大小
|
||||
persistence.offset_file_read_buffer_size=20480
|
||||
persistence.step_size_for_location_file_offset=20480
|
||||
#处理文件完成之后,等待时间(单位:毫秒)
|
||||
persistence.switch_file_wait_time=5000
|
||||
#追加EOF标志位的线程数量
|
||||
|
|
|
|||
Loading…
Reference in New Issue