Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
46edbd1
add socks5 settings on login popup
Oct 23, 2021
98e7342
eclipse version update
Oct 24, 2021
71f01b7
logging
Oct 24, 2021
19a0de8
Merge pull request #829 from zbum/feature/socks5
gunlee01 Oct 24, 2021
7e67ce2
for java6
gunlee01 Oct 25, 2021
f937ce0
When multiple objects are connected, unable to display information in…
hwany7seo Nov 4, 2021
36f2607
added autoscroll on table and deleted unused sort function
hwany7seo Nov 5, 2021
3725e81
added image
hwany7seo Nov 5, 2021
cf0527e
fix array out of bound error
Nov 5, 2021
37eb75c
fix array out of bound error
Nov 5, 2021
9ba0141
[agent.java] webflux support bug fix. (fix unfinished xlog on some jv…
gunlee01 Nov 30, 2021
2074e54
[agent.java] obj_name on kube pod auto naming bug fix
gunlee01 Nov 30, 2021
9768677
[agent.java] add stuck service profile stop option.
gunlee01 Nov 30, 2021
4258813
[agent.java] bug fix for scouter weaver feature.
gunlee01 Nov 30, 2021
535b20a
Merge pull request #834 from hwany7seo/multiple_object_issue
gunlee01 Nov 30, 2021
134e5f1
Merge pull request #835 from zbum/feature/socks5
gunlee01 Nov 30, 2021
37e6e82
[agent.java] change maps of holding trace contexts from scouter's pri…
gunlee01 Dec 25, 2021
4c05c8e
documentation for scouter.weaver
gunlee01 Dec 25, 2021
cb919b6
WIP check xlog display missing after ServiceSummary.java modified
gunlee01 Dec 27, 2021
2f97a7d
misc
gunlee01 Dec 27, 2021
3ceec0c
Merge branch 'develop' into feature/issue-missing-xlog
gunlee01 Dec 27, 2021
49d10fc
[client] rcp build version to 2022-03
gunlee01 Mar 26, 2022
1eeee67
[agent.java] Only when the trace_propagete_b3_header option is true, …
gunlee01 Mar 26, 2022
6ccb929
scouter version v2.17.1
gunlee01 Mar 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ scouter.server.boot/database/*

scouter.document/.project

build_client_local.sh
build_package_local.sh


### Vim template
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ SCOUTER can help you.

- **Web API (Since @1.8.0)** : scouter web apis to get counters, XLogs, profiles and another performance metrics via HTTP protocol.
- [Web API Guide](./scouter.document/tech/Web-API-Guide.md)
- **Weaver (Since @2.17.0)** : Provides the ability to directly control Scouter XLog and Profiles at the code level of Java applications.
- [Scouter Weaver Guide](./scouter.document/weaver/Weaver-Guide.md)

### 3rd-party UIs
- **scouter paper** : [scouter paper homepage](https://scouter-contrib.github.io/scouter-paper/)
Expand Down
1 change: 1 addition & 0 deletions README_kr.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@

- **Web API (Since @1.8.0)** : 성능 카운터, XLog, 프로파일등의 정보를 HTTP 프로토콜을 통해 제공
- [Web API Guide](./scouter.document/tech/Web-API-Guide_kr.md)
- **Weaver (Since @2.17.0)** : Java 애플리케이션의 코드 수준에서 Scouter XLog와 Profile을 직접 제어하는 기능 제공

### 3rd-party UIs
- **scouter paper** : [scouter-paper homepage](https://scouter-contrib.github.io/scouter-paper/)
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.17.0-SNAPSHOT</version> <!--scouter-->
<version>2.17.1</version> <!--scouter-->
<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.17.0-SNAPSHOT</version> <!--scouter-->
<version>2.17.1</version> <!--scouter-->
</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.17.0-SNAPSHOT</version> <!--scouter-->
<version>2.17.1</version> <!--scouter-->
</parent>

<artifactId>scouter-agent-host</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions scouter.agent.host/src/main/java/scouter/agent/Configure.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,8 @@ public StringKeyLinkedMap<ValueType> getConfigureValueType() {
}

private boolean isKube() {
Properties properties = System.getProperties();
return !StringUtil.isEmpty(properties.getProperty("KUBERNETES_SERVICE_HOST"));
Map<String, String> env = System.getenv();
return !StringUtil.isEmpty(env.get("KUBERNETES_SERVICE_HOST"));
}

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,49 @@ public void writeHostNameForKube(CounterBasket pw) {
File dir = new File(conf.counter_object_registry_path);
File file = new File(dir, seqNoForKube + ".scouterkubeseq");
if (dir.canWrite()) {
deleteAllHostNameFileWithIgnore(dir, seqNoForKube);
FileUtil.save(file, conf.obj_name.getBytes());
}

} else {
File dir = new File(conf.counter_object_registry_path);
if (dir == null)
return;

File[] files = dir.listFiles();
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory())
continue;
String name = files[i].getName();
if (!name.endsWith(".scouterkubeseq")) {
continue;
}
if (files[i].canWrite()) {
files[i].delete();
}
deleteAllHostNameFileWithIgnore(dir, -1);
}
}

private void deleteAllHostNameFileWithIgnore(File dir, long ignoreSeq) {
if (dir == null)
return;

File[] files = dir.listFiles();
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory())
continue;
String name = files[i].getName();
if (!name.endsWith(".scouterkubeseq")) {
continue;
}

int kubeSeq = cintErrorMinusOne(name.substring(0, name.lastIndexOf(".")));
if (kubeSeq < 0)
continue;
if (kubeSeq == ignoreSeq) {
continue;
}
if (files[i].canWrite()) {
files[i].delete();
}
}
}

public static int cintErrorMinusOne(String value) {
if (value == null) {
return -1;
} else {
try {
return Integer.parseInt(value);
} catch (Exception e) {
return -1;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion 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.17.0-SNAPSHOT</version> <!--scouter-->
<version>2.17.1</version> <!--scouter-->
</parent>

<artifactId>scouter-agent-java</artifactId>
Expand Down
15 changes: 13 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 @@ -323,6 +323,13 @@ public static final Configure getInstance() {
@ConfigDesc("")
public int autodump_stuck_check_interval_ms = 10000;

@ConfigDesc("ends sxlog profile when it exceeds profile_force_end_stuck_millis.")
public boolean profile_force_end_stuck_service = true;
@ConfigDesc("alert when forcibly ends xlog profile.")
public boolean profile_force_end_stuck_alert = true;
@ConfigDesc("stuck service millis for forcibly ends xlog profile")
public int profile_force_end_stuck_millis = 300000;

//Auto dump options on exceeded process cpu
@ConfigDesc("Enable the function to generate dump file when this process cpu is over than the set threshold")
public boolean autodump_cpu_exceeded_enabled = false;
Expand Down Expand Up @@ -974,6 +981,10 @@ private void apply() {
this.autodump_stuck_thread_ms = getInt("autodump_stuck_thread_ms", 0);
this.autodump_stuck_check_interval_ms = getInt("autodump_stuck_check_interval_ms", 10000);

this.profile_force_end_stuck_service = getBoolean("profile_force_end_stuck_service", false);
this.profile_force_end_stuck_alert = getBoolean("profile_force_end_stuck_alert", true);
this.profile_force_end_stuck_millis = getInt("profile_force_end_stuck_millis", 300000);

this.autodump_cpu_exceeded_enabled = getBoolean("autodump_cpu_exceeded_enabled", false);
this.autodump_cpu_exceeded_threshold_pct = getInt("autodump_cpu_exceeded_threshold_pct", 90);
this.autodump_cpu_exceeded_duration_ms = getInt("autodump_cpu_exceeded_duration_ms", 30000);
Expand Down Expand Up @@ -1627,8 +1638,8 @@ public void initTmpDir() {
}

private boolean isKube() {
Properties properties = System.getProperties();
return !StringUtil.isEmpty(properties.getProperty("KUBERNETES_SERVICE_HOST"));
Map<String, String> env = System.getenv();
return !StringUtil.isEmpty(env.get("KUBERNETES_SERVICE_HOST"));
}

private String readHostNameFromHostAgent() {
Expand Down
4 changes: 2 additions & 2 deletions scouter.agent.java/src/main/java/scouter/agent/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private static String toString(Object message) {

private static String build(String id, String message) {
if (message == null) {
return "null-err-message";
message = "null-err-message";
}
return new StringBuffer(20 + id.length() + message.length())
.append(DateUtil.datetime(System.currentTimeMillis())).append(" [").append(id).append("] ")
Expand Down Expand Up @@ -254,4 +254,4 @@ public void close() {
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public JDBCPreparedStatementASM() {
noField.add("jdbc/FakePreparedStatement2");
noField.add("org/mariadb/jdbc/MariaDbClientPreparedStatement");
noField.add("org/mariadb/jdbc/MariaDbServerPreparedStatement");
target.add("com/mysql/cj/jdbc/ServerPreparedStatement");
noField.add("com/mysql/cj/jdbc/ServerPreparedStatement");
}

public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
public class WeaverClassASM implements IASM, Opcodes {

public static Set<String> weaveMethodNames = new HashSet<>();
public static Set<String> weaveMethodNames = new HashSet<String>();

@Override
public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

public class ReactiveSupportFactory {
private static final String REACTIVE_SUPPORT = "scouter.xtra.reactive.ReactiveSupport";
private static final String REACTIVE_SUPPORT_W_COROUTINE = "scouter.xtra.reactive.ReactiveSupportWithCoroutine";

public static final IReactiveSupport dummy = new IReactiveSupport() {
public Object subscriptOnContext(Object mono0, TraceContext traceContext) {
Expand All @@ -46,11 +47,20 @@ public static IReactiveSupport create(ClassLoader parent) {
if (loader == null) {
return dummy;
}
Class c = Class.forName(REACTIVE_SUPPORT, true, loader);
return (IReactiveSupport) c.newInstance();
IReactiveSupport reactiveSupport = null;
try {
Class c = Class.forName(REACTIVE_SUPPORT_W_COROUTINE, true, loader);
reactiveSupport = (IReactiveSupport) c.newInstance();
} catch (Throwable e) {
Logger.println("A133-0", "fail to create reactive support: REACTIVE_SUPPORT_W_COROUTINE", e);
Class c = Class.forName(REACTIVE_SUPPORT, true, loader);
reactiveSupport = (IReactiveSupport) c.newInstance();
Logger.println("success to create reactive support without coroutine support");
}
return reactiveSupport;

} catch (Throwable e) {
Logger.println("A133-1", "fail to create", e);
Logger.println("A133-2", "fail to create", e);
return dummy;
}
}
Expand Down
Loading