parent
5826dcdbe5
commit
0d96cf11d3
|
|
@ -2,6 +2,7 @@ package com.ai.cloud.skywalking.buffer;
|
|||
|
||||
|
||||
import com.ai.cloud.skywalking.conf.Config;
|
||||
import com.ai.cloud.skywalking.conf.Constants;
|
||||
import com.ai.cloud.skywalking.protocol.Span;
|
||||
import com.ai.cloud.skywalking.selfexamination.HealthCollector;
|
||||
import com.ai.cloud.skywalking.selfexamination.HeathReading;
|
||||
|
|
@ -76,7 +77,7 @@ public class BufferGroup {
|
|||
data = new StringBuilder();
|
||||
}
|
||||
|
||||
data.append(dataBuffer[i] + ";");
|
||||
data.append(dataBuffer[i] + Constants.DATA_SPILT);
|
||||
dataBuffer[i] = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ public class AuthDesc {
|
|||
|
||||
static {
|
||||
ConfigInitializer.initialize();
|
||||
ConfigValidator.validate();
|
||||
}
|
||||
|
||||
public static boolean isAuth() {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class Config {
|
|||
|
||||
public static class Buffer {
|
||||
// 每个Buffer的最大个数
|
||||
public static int BUFFER_MAX_SIZE = 18000;
|
||||
public static int BUFFER_MAX_SIZE = 20000;
|
||||
|
||||
// Buffer池的最大长度
|
||||
public static int POOL_SIZE = 5;
|
||||
|
|
@ -47,7 +47,7 @@ public class Config {
|
|||
public static boolean IS_OFF = false;
|
||||
|
||||
// 发送的最大长度
|
||||
public static int MAX_SEND_LENGTH = 1800;
|
||||
public static int MAX_SEND_LENGTH = 18500;
|
||||
|
||||
public static long RETRY_GET_SENDER_WAIT_INTERVAL = 2000L;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package com.ai.cloud.skywalking.conf;
|
||||
|
||||
public class ConfigValidator {
|
||||
private ConfigValidator() {
|
||||
// Non
|
||||
}
|
||||
|
||||
public static boolean validate() {
|
||||
if (!validateSendMaxLength()) {
|
||||
throw new IllegalArgumentException("Max send length must great than the sum of the maximum " +
|
||||
"length of sending exception stack and the maximum length of sending business key.");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean validateSendMaxLength() {
|
||||
if (Config.Sender.MAX_SEND_LENGTH < (Config.BuriedPoint.MAX_EXCEPTION_STACK_LENGTH +
|
||||
Config.BuriedPoint.BUSINESSKEY_MAX_LENGTH)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -3,4 +3,6 @@ package com.ai.cloud.skywalking.conf;
|
|||
public class Constants {
|
||||
|
||||
public static final String HEALTH_DATA_SPILT_PATTERN = "^~";
|
||||
|
||||
public static final String DATA_SPILT = ",";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue