Skip to content

Commit

Permalink
Merge pull request #822 from scouter-project/develop
Browse files Browse the repository at this point in the history
release v2.15.0
  • Loading branch information
gunlee01 authored Oct 1, 2021
2 parents a016751 + 14c904d commit d541b38
Show file tree
Hide file tree
Showing 159 changed files with 8,437 additions and 801 deletions.
5 changes: 5 additions & 0 deletions build_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# download maven from :
# https://maven.apache.org

if [ ! -z "${JAVA_11_HOME}" ]; then
echo JAVA_11_HOME: ${JAVA_11_HOME}
JAVA_HOME=${JAVA_11_HOME}
fi

MVN="`which mvn`"
if [ ! -z "${MAVEN_HOME}" ]; then
echo MAVEN_HOME: ${MAVEN_HOME}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.10.2</version>
<version>2.15.0</version>
<packaging>pom</packaging>

<name>SCOUTER APM</name>
Expand Down
2 changes: 1 addition & 1 deletion scouter.agent.batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.10.2</version>
<version>2.15.0</version>
</parent>

<artifactId>scouter-agent-batch</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion scouter.agent.host/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.10.2</version>
<version>2.15.0</version>
</parent>

<artifactId>scouter-agent-host</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions scouter.agent.java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.10.2</version>
<version>2.15.0</version>
</parent>

<artifactId>scouter-agent-java</artifactId>
Expand Down Expand Up @@ -384,12 +384,12 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>8.0.1</version>
<version>9.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>8.0.1</version>
<version>9.2</version>
</dependency>
<!-- local lib -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public byte[] transform(final ClassLoader loader, String className, final Class
ObjTypeDetector.check(className);
final ClassDesc classDesc = new ClassDesc();
ClassReader cr = new ClassReader(classfileBuffer);
cr.accept(new ClassVisitor(Opcodes.ASM8) {
cr.accept(new ClassVisitor(Opcodes.ASM9) {
public void visit(int version, int access, String name, String signature, String superName,
String[] interfaces) {
classDesc.set(version, access, name, signature, superName, interfaces);
Expand Down
36 changes: 34 additions & 2 deletions scouter.agent.java/src/main/java/scouter/agent/Configure.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,13 @@ public static final Configure getInstance() {
// @ConfigDesc("Activating profile summary function")
// public boolean profile_summary_mode_enabled = false;

@ConfigDesc("turn off profile")
public boolean profile_off = false;

@ConfigDesc("Profiling the memory usage of each method")
public boolean profile_thread_cputime_enabled = false;
@ConfigDesc("Profiling the memory usage of each service")
public boolean profile_thread_memory_usage_enabled = true;
public boolean profile_thread_memory_usage_enabled = false;
@ConfigDesc("ThreadStack profile for open socket")
public boolean profile_socket_open_fullstack_enabled = false;
@ConfigDesc("ThreadStack profile for a certain port of open socket")
Expand Down Expand Up @@ -227,6 +230,8 @@ public static final Configure getInstance() {
public String trace_http_client_ip_header_key = "";
@ConfigDesc("Activating gxid connection in HttpTransfer")
public boolean trace_interservice_enabled = true;
@ConfigDesc("propagate b3 header")
public boolean trace_propagete_b3_header = true;
@ConfigDesc("")
public String _trace_interservice_gxid_header_key = "X-Scouter-Gxid";
@ConfigDesc("")
Expand Down Expand Up @@ -366,6 +371,8 @@ public static final Configure getInstance() {

@ConfigDesc("XLog sampling mode enabled")
public boolean xlog_sampling_enabled = false;
@ConfigDesc("rate precision, default 1 means 1%. use 10 for 0.1%.")
public int xlog_sampling_rate_precision = 1;
@ConfigDesc("XLog sampling but discard profile only not XLog.")
public boolean xlog_sampling_only_profile = false;
@ConfigDesc("XLog sampling bound millisecond - step1(lowest : range - from 0 to here)")
Expand All @@ -387,6 +394,8 @@ public static final Configure getInstance() {
//XLog sampling for service patterns options
@ConfigDesc("XLog patterned sampling mode enabled")
public boolean xlog_patterned_sampling_enabled = false;
@ConfigDesc("rate precision, default 1 means 1%. use 10 for 0.1%.")
public int xlog_patterned_sampling_rate_precision = 1;
@ConfigDesc("XLog patterned sampling service patterns\neg) /user/{userId}<GET>,/device/*")
@ConfigValueType(ValueType.COMMA_SEPARATED_VALUE)
public String xlog_patterned_sampling_service_patterns = "";
Expand All @@ -411,6 +420,8 @@ public static final Configure getInstance() {
//XLog patterned sampling options for another sampling group
@ConfigDesc("XLog patterned sampling mode enabled")
public boolean xlog_patterned2_sampling_enabled = false;
@ConfigDesc("rate precision, default 1 means 1%. use 10 for 0.1%.")
public int xlog_patterned2_sampling_rate_precision = 1;
@ConfigDesc("XLog patterned sampling service patterns\neg) /user/{userId}<GET>,/device/*")
@ConfigValueType(ValueType.COMMA_SEPARATED_VALUE)
public String xlog_patterned2_sampling_service_patterns = "";
Expand All @@ -435,6 +446,8 @@ public static final Configure getInstance() {
//XLog patterned sampling options for another sampling group
@ConfigDesc("XLog patterned sampling mode enabled")
public boolean xlog_patterned3_sampling_enabled = false;
@ConfigDesc("rate precision, default 1 means 1%. use 10 for 0.1%.")
public int xlog_patterned3_sampling_rate_precision = 1;
@ConfigDesc("XLog patterned sampling service patterns\neg) /user/{userId}<GET>,/device/*")
@ConfigValueType(ValueType.COMMA_SEPARATED_VALUE)
public String xlog_patterned3_sampling_service_patterns = "";
Expand All @@ -459,6 +472,8 @@ public static final Configure getInstance() {
//XLog patterned sampling options for another sampling group
@ConfigDesc("XLog patterned sampling mode enabled")
public boolean xlog_patterned4_sampling_enabled = false;
@ConfigDesc("rate precision, default 1 means 1%. use 10 for 0.1%.")
public int xlog_patterned4_sampling_rate_precision = 1;
@ConfigDesc("XLog patterned sampling service patterns\neg) /user/{userId}<GET>,/device/*")
@ConfigValueType(ValueType.COMMA_SEPARATED_VALUE)
public String xlog_patterned4_sampling_service_patterns = "";
Expand All @@ -483,6 +498,8 @@ public static final Configure getInstance() {
//XLog patterned sampling options for another sampling group
@ConfigDesc("XLog patterned sampling mode enabled")
public boolean xlog_patterned5_sampling_enabled = false;
@ConfigDesc("rate precision, default 1 means 1%. use 10 for 0.1%.")
public int xlog_patterned5_sampling_rate_precision = 1;
@ConfigDesc("XLog patterned sampling service patterns\neg) /user/{userId}<GET>,/device/*")
@ConfigValueType(ValueType.COMMA_SEPARATED_VALUE)
public String xlog_patterned5_sampling_service_patterns = "";
Expand Down Expand Up @@ -780,6 +797,10 @@ public static final Configure getInstance() {
public boolean _psts_enabled = false;
@ConfigDesc("PSTS(periodical stacktrace step) thread dump Interval(ms) - hard min limit 2000")
public int _psts_dump_interval_ms = 10000;
@ConfigDesc("PSTS(periodical stacktrace step) thread dump min time. it dumps only the elapsed time is over than this option")
public int _psts_dump_min_ms = 1000;
@ConfigDesc("PSTS(periodical stacktrace step) thread dump max count in 1 interval")
public int _psts_dump_max_count = 100;
public boolean _psts_progressive_reactor_thread_trace_enabled = true;

//Summary
Expand Down Expand Up @@ -953,8 +974,10 @@ private void apply() {
this.autodump_cpu_exceeded_dump_cnt = getInt("autodump_cpu_exceeded_dump_cnt", 3);

this.mgr_static_content_extensions = getValue("mgr_static_content_extensions", "js, htm, html, gif, png, jpg, css");

this.profile_off = getBoolean("profile_off", false);
this.profile_thread_cputime_enabled = getBoolean("profile_thread_cputime_enabled", false);
this.profile_thread_memory_usage_enabled = getBoolean("profile_thread_memory_usage_enabled", true);
this.profile_thread_memory_usage_enabled = getBoolean("profile_thread_memory_usage_enabled", false);
this.profile_socket_open_fullstack_enabled = getBoolean("profile_socket_open_fullstack_enabled", false);
this.trace_background_socket_enabled = getBoolean("trace_background_socket_enabled", true);
this.profile_socket_open_fullstack_port = getInt("profile_socket_open_fullstack_port", 0);
Expand Down Expand Up @@ -1099,6 +1122,7 @@ private void apply() {

this.trace_http_client_ip_header_key = getValue("trace_http_client_ip_header_key", "");
this.trace_interservice_enabled = getBoolean("trace_interservice_enabled", true);
this.trace_propagete_b3_header = getBoolean("trace_propagete_b3_header", true);
this.trace_response_gxid_enabled = getBoolean("trace_response_gxid_enabled", false);
this._trace_interservice_gxid_header_key = getValue("_trace_interservice_gxid_header_key", "X-Scouter-Gxid");
this._trace_interservice_callee_header_key = getValue("_trace_interservice_callee_header_key", "X-Scouter-Callee");
Expand Down Expand Up @@ -1152,6 +1176,8 @@ private void apply() {

this._psts_enabled = getBoolean("_psts_enabled", false);
this._psts_dump_interval_ms = getInt("_psts_dump_interval_ms", 10000);
this._psts_dump_min_ms = getInt("_psts_dump_min_ms", 1000);
this._psts_dump_max_count = getInt("_psts_dump_max_count", 100);
this._psts_progressive_reactor_thread_trace_enabled = getBoolean("_psts_progressive_reactor_dump_enabled", true);

// 웹시스템으로 부터 WAS 사이의 성능과 어떤 웹서버가 요청을 보내 왔는지를 추적하는 기능을 ON/OFF하고
Expand Down Expand Up @@ -1231,6 +1257,7 @@ private void apply() {
this.xlog_sampling_exclude_patterns = getValue("xlog_sampling_exclude_patterns", "");

this.xlog_sampling_enabled = getBoolean("xlog_sampling_enabled", false);
this.xlog_sampling_rate_precision = getInt("xlog_sampling_rate_precision", 1);
this.xlog_sampling_only_profile = getBoolean("xlog_sampling_only_profile", false);
this.xlog_sampling_step1_ms = getInt("xlog_sampling_step1_ms", 100);
this.xlog_sampling_step1_rate_pct = getInt("xlog_sampling_step1_rate_pct", 3);
Expand All @@ -1241,6 +1268,7 @@ private void apply() {
this.xlog_sampling_over_rate_pct = getInt("xlog_sampling_over_rate_pct", 100);

this.xlog_patterned_sampling_enabled = getBoolean("xlog_patterned_sampling_enabled", false);
this.xlog_patterned_sampling_rate_precision = getInt("xlog_patterned_sampling_rate_precision", 1);
this.xlog_patterned_sampling_service_patterns = getValue("xlog_patterned_sampling_service_patterns", "");
this.xlog_patterned_sampling_only_profile = getBoolean("xlog_patterned_sampling_only_profile", false);
this.xlog_patterned_sampling_step1_ms = getInt("xlog_patterned_sampling_step1_ms", 100);
Expand All @@ -1252,6 +1280,7 @@ private void apply() {
this.xlog_patterned_sampling_over_rate_pct = getInt("xlog_patterned_sampling_over_rate_pct", 100);

this.xlog_patterned2_sampling_enabled = getBoolean("xlog_patterned2_sampling_enabled", false);
this.xlog_patterned2_sampling_rate_precision = getInt("xlog_patterned2_sampling_rate_precision", 1);
this.xlog_patterned2_sampling_service_patterns = getValue("xlog_patterned2_sampling_service_patterns", "");
this.xlog_patterned2_sampling_only_profile = getBoolean("xlog_patterned2_sampling_only_profile", false);
this.xlog_patterned2_sampling_step1_ms = getInt("xlog_patterned2_sampling_step1_ms", 100);
Expand All @@ -1263,6 +1292,7 @@ private void apply() {
this.xlog_patterned2_sampling_over_rate_pct = getInt("xlog_patterned2_sampling_over_rate_pct", 100);

this.xlog_patterned3_sampling_enabled = getBoolean("xlog_patterned3_sampling_enabled", false);
this.xlog_patterned3_sampling_rate_precision = getInt("xlog_patterned3_sampling_rate_precision", 1);
this.xlog_patterned3_sampling_service_patterns = getValue("xlog_patterned3_sampling_service_patterns", "");
this.xlog_patterned3_sampling_only_profile = getBoolean("xlog_patterned3_sampling_only_profile", false);
this.xlog_patterned3_sampling_step1_ms = getInt("xlog_patterned3_sampling_step1_ms", 100);
Expand All @@ -1274,6 +1304,7 @@ private void apply() {
this.xlog_patterned3_sampling_over_rate_pct = getInt("xlog_patterned3_sampling_over_rate_pct", 100);

this.xlog_patterned4_sampling_enabled = getBoolean("xlog_patterned4_sampling_enabled", false);
this.xlog_patterned4_sampling_rate_precision = getInt("xlog_patterned4_sampling_rate_precision", 1);
this.xlog_patterned4_sampling_service_patterns = getValue("xlog_patterned4_sampling_service_patterns", "");
this.xlog_patterned4_sampling_only_profile = getBoolean("xlog_patterned4_sampling_only_profile", false);
this.xlog_patterned4_sampling_step1_ms = getInt("xlog_patterned4_sampling_step1_ms", 100);
Expand All @@ -1285,6 +1316,7 @@ private void apply() {
this.xlog_patterned4_sampling_over_rate_pct = getInt("xlog_patterned4_sampling_over_rate_pct", 100);

this.xlog_patterned5_sampling_enabled = getBoolean("xlog_patterned5_sampling_enabled", false);
this.xlog_patterned5_sampling_rate_precision = getInt("xlog_patterned5_sampling_rate_precision", 1);
this.xlog_patterned5_sampling_service_patterns = getValue("xlog_patterned5_sampling_service_patterns", "");
this.xlog_patterned5_sampling_only_profile = getBoolean("xlog_patterned5_sampling_only_profile", false);
this.xlog_patterned5_sampling_step1_ms = getInt("xlog_patterned5_sampling_step1_ms", 100);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private static String getClassName(byte[] bytes) {
try {
final ClassDesc classDesc = new ClassDesc();
ClassReader cr = new ClassReader(bytes);
cr.accept(new ClassVisitor(Opcodes.ASM8) {
cr.accept(new ClassVisitor(Opcodes.ASM9) {
public void visit(int version, int access, String name, String signature, String superName,
String[] interfaces) {
classDesc.set(version, access, name, signature, superName, interfaces);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public byte[] transform(final ClassLoader loader, String className, final Class

final ClassDesc classDesc = new ClassDesc();
ClassReader cr = new ClassReader(classfileBuffer);
cr.accept(new ClassVisitor(Opcodes.ASM8) {
cr.accept(new ClassVisitor(Opcodes.ASM9) {
public void visit(int version, int access, String name, String signature, String superName,
String[] interfaces) {
classDesc.set(version, access, name, signature, superName, interfaces);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class AddFieldCV extends ClassVisitor implements Opcodes {
private String field;
private String className;
public AddFieldCV(ClassVisitor cv, String className, String field) {
super(ASM8, cv);
super(ASM9, cv);
this.field = field;
this.className = className;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ApiCallResponseObjectCV extends ClassVisitor implements Opcodes {
String className;

public ApiCallResponseObjectCV(ClassVisitor cv, String className) {
super(ASM8, cv);
super(ASM9, cv);
this.className = className;
}

Expand Down Expand Up @@ -89,7 +89,7 @@ class ApiCallResponseObjectInitMV extends LocalVariablesSorter implements Opcode
private Label startFinally = new Label();

public ApiCallResponseObjectInitMV(String className, int access, String name, String desc, MethodVisitor mv) {
super(ASM8, access, desc, mv);
super(ASM9, access, desc, mv);
this.className = className;
this.name = name;
this.desc = desc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class ApicallExtCV extends ClassVisitor implements Opcodes {
private HookingSet mset;

public ApicallExtCV(ClassVisitor cv, HookingSet mset, String className) {
super(ASM8, cv);
super(ASM9, cv);
this.mset = mset;
this.className = className;
}
Expand Down Expand Up @@ -152,7 +152,7 @@ class ApicallExtMV extends LocalVariablesSorter implements Opcodes {

public ApicallExtMV(int access, String desc, MethodVisitor mv, Type[] paramTypes, boolean isStatic,
String classname, String methodname, String methoddesc) {
super(ASM8, access, desc, mv);
super(ASM9, access, desc, mv);
this.paramTypes = paramTypes;
this.returnType = Type.getReturnType(desc);
this.isStatic = isStatic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ApicallInfoCV extends ClassVisitor implements Opcodes {
public String className;
private HookingSet mset;
public ApicallInfoCV(ClassVisitor cv, HookingSet mset, String className) {
super(ASM8, cv);
super(ASM9, cv);
this.mset = mset;
this.className = className;
}
Expand All @@ -84,7 +84,7 @@ class ApicallInfoMV extends LocalVariablesSorter implements Opcodes {
private static final String START_SIGNATURE = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V";
public ApicallInfoMV(int access, String desc, MethodVisitor mv, Type[] paramTypes, boolean isStatic,
String classname, String methodname, String methoddesc) {
super(ASM8, access, desc, mv);
super(ASM9, access, desc, mv);
this.paramTypes = paramTypes;
this.isStatic = isStatic;
this.className = classname;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ApicallJavaHttpRequestCV extends ClassVisitor implements Opcodes {
public String className;
private HookingSet mset;
public ApicallJavaHttpRequestCV(ClassVisitor cv, HookingSet mset, String className) {
super(ASM8, cv);
super(ASM9, cv);
this.mset = mset;
this.className = className;
}
Expand All @@ -58,7 +58,7 @@ class ApicallJavaHttpRequestMV extends LocalVariablesSorter implements Opcodes {
String desc;

public ApicallJavaHttpRequestMV(int access, String name, String desc, MethodVisitor mv) {
super(ASM8, access, desc, mv);
super(ASM9, access, desc, mv);
this.name = name;
this.desc = desc;
}
Expand All @@ -69,4 +69,4 @@ public void visitCode() {
mv.visitMethodInsn(Opcodes.INVOKESTATIC, TARGET, METHOD, METHOD_DESC, false);
mv.visitCode();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class RestTemplateResponseHandlerCV extends ClassVisitor implements Opcodes {
public String className;
private HookingSet mset;
public RestTemplateResponseHandlerCV(ClassVisitor cv, HookingSet mset, String className) {
super(ASM8, cv);
super(ASM9, cv);
this.mset = mset;
this.className = className;
}
Expand Down Expand Up @@ -86,7 +86,7 @@ class RestTemplateResponseHandlerMV extends LocalVariablesSorter implements Opco
int respIdx;

public RestTemplateResponseHandlerMV(int access, String name, String desc, MethodVisitor mv) {
super(ASM8, access, desc, mv);
super(ASM9, access, desc, mv);
this.name = name;
this.desc = desc;
this.respIdx = AsmUtil.getIdxByType(access, desc, Type.getType("Lorg/springframework/http/client/ClientHttpResponse;"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class HttpAccessorCV extends ClassVisitor implements Opcodes {
public String className;
private HookingSet mset;
public HttpAccessorCV(ClassVisitor cv, HookingSet mset, String className) {
super(ASM8, cv);
super(ASM9, cv);
this.mset = mset;
this.className = className;
}
Expand Down Expand Up @@ -84,7 +84,7 @@ class CreateRequestMV extends LocalVariablesSorter implements Opcodes {
private Type returnType;

public CreateRequestMV(int access, String name, String desc, MethodVisitor mv) {
super(ASM8, access, desc, mv);
super(ASM9, access, desc, mv);
this.name = name;
this.desc = desc;
this.returnType = Type.getReturnType(desc);
Expand Down
Loading

0 comments on commit d541b38

Please sign in to comment.