diff --git a/README.md b/README.md
index e64f98bcd..2471171d5 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ SCOUTER can help you.
- **Server (Collector)** : save the performance metrics from scouter agents or telegraf. The data is streamed to scouter client.
-- **Client (Viewer)** : client program based on RCP.
+- **Client (Viewer)** : client program based on RCP. (not support OSX Big Sur.)
- **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)
diff --git a/README_kr.md b/README_kr.md
index 8a29036bd..400ad0f84 100644
--- a/README_kr.md
+++ b/README_kr.md
@@ -56,7 +56,7 @@
- **Server (Collector)** : Agent가 전송한 데이터를 저장하고 Client 요청시 Client에게 적절한 데이터를 전송
-- **Client (Viewer)** : 수집된 데이터를 보기 위한 RCP 기반 Client 프로그램
+- **Client (Viewer)** : 수집된 데이터를 보기 위한 RCP 기반 Client 프로그램. (OSX Big Sur 미지원)
- **Web API (Since @1.8.0)** : 성능 카운터, XLog, 프로파일등의 정보를 HTTP 프로토콜을 통해 제공
- [Web API Guide](./scouter.document/tech/Web-API-Guide_kr.md)
diff --git a/pom.xml b/pom.xml
index 6a0c4c272..474692dec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
io.github.scouter-project
scouter-parent
- 2.10.0
+ 2.10.2
pom
SCOUTER APM
diff --git a/scouter.agent.batch/pom.xml b/scouter.agent.batch/pom.xml
index c3ba4d530..924dba26b 100644
--- a/scouter.agent.batch/pom.xml
+++ b/scouter.agent.batch/pom.xml
@@ -5,7 +5,7 @@
io.github.scouter-project
scouter-parent
- 2.10.0
+ 2.10.2
scouter-agent-batch
diff --git a/scouter.agent.host/pom.xml b/scouter.agent.host/pom.xml
index 2340be0e7..7c466db45 100644
--- a/scouter.agent.host/pom.xml
+++ b/scouter.agent.host/pom.xml
@@ -4,7 +4,7 @@
io.github.scouter-project
scouter-parent
- 2.10.0
+ 2.10.2
scouter-agent-host
diff --git a/scouter.agent.java/pom.xml b/scouter.agent.java/pom.xml
index ecf24f2d7..63c089242 100644
--- a/scouter.agent.java/pom.xml
+++ b/scouter.agent.java/pom.xml
@@ -4,7 +4,7 @@
io.github.scouter-project
scouter-parent
- 2.10.0
+ 2.10.2
scouter-agent-java
diff --git a/scouter.agent.java/src/main/java/reactor/core/publisher/ScouterOptimizableOperatorProxy.java b/scouter.agent.java/src/main/java/reactor/core/publisher/ScouterOptimizableOperatorProxy.java
index 77c61b493..069ef24ac 100644
--- a/scouter.agent.java/src/main/java/reactor/core/publisher/ScouterOptimizableOperatorProxy.java
+++ b/scouter.agent.java/src/main/java/reactor/core/publisher/ScouterOptimizableOperatorProxy.java
@@ -19,6 +19,7 @@
package reactor.core.publisher;
import scouter.agent.Logger;
+import scouter.agent.util.Tuple;
/**
* @author Gun Lee (gunlee01@gmail.com) on 2020/08/08
@@ -26,10 +27,11 @@
public class ScouterOptimizableOperatorProxy {
public static final String EMPTY = "";
+ public static final Tuple.StringLongPair EMPTYOBJ = new Tuple.StringLongPair("", 0);
public static boolean accessible = false;
public static boolean first = true;
- public static String nameOnCheckpoint(Object candidate) {
+ public static Tuple.StringLongPair nameOnCheckpoint(Object candidate, int maxScanDepth) {
try {
if (!accessible && first) {
try {
@@ -42,34 +44,47 @@ public static String nameOnCheckpoint(Object candidate) {
first = false;
}
if (!accessible) {
- return EMPTY;
+ return EMPTYOBJ;
}
if (candidate instanceof OptimizableOperator) {
- OptimizableOperator, ?> operator = ((OptimizableOperator, ?>) candidate).nextOptimizableSource();
- if (operator == null) {
- return EMPTY;
+ OptimizableOperator, ?> closeAssembly = findCloseAssembly((OptimizableOperator, ?>) candidate, maxScanDepth);
+ if (closeAssembly == null) {
+ return EMPTYOBJ;
}
- if (operator instanceof MonoOnAssembly) {
- FluxOnAssembly.AssemblySnapshot snapshot = ((MonoOnAssembly) operator).stacktrace;
+ if (closeAssembly instanceof MonoOnAssembly) {
+ FluxOnAssembly.AssemblySnapshot snapshot = ((MonoOnAssembly) closeAssembly).stacktrace;
if (snapshot != null && snapshot.checkpointed) {
- return snapshot.cached;
+ return new Tuple.StringLongPair(snapshot.cached, snapshot.hashCode());
}
- } else if (operator instanceof FluxOnAssembly) {
- FluxOnAssembly.AssemblySnapshot snapshot = ((FluxOnAssembly) operator).snapshotStack;
+ } else if (closeAssembly instanceof FluxOnAssembly) {
+ FluxOnAssembly.AssemblySnapshot snapshot = ((FluxOnAssembly) closeAssembly).snapshotStack;
if (snapshot != null && snapshot.checkpointed) {
- return snapshot.cached;
+ return new Tuple.StringLongPair(snapshot.cached, snapshot.hashCode());
}
}
}
- return EMPTY;
+ return EMPTYOBJ;
} catch (Throwable e) {
- return EMPTY;
+ return EMPTYOBJ;
}
}
- public static void appendSources4Dump(Object candidate, StringBuilder builder) {
+ public static OptimizableOperator, ?> findCloseAssembly(OptimizableOperator, ?> candidate, int maxScanDepth) {
+ OptimizableOperator, ?> operator = candidate;
+ for (int i = 0; i < maxScanDepth; i++) {
+ operator = operator.nextOptimizableSource();
+ if (operator == null) {
+ return null;
+ } else if (operator instanceof MonoOnAssembly || operator instanceof FluxOnAssembly) {
+ return operator;
+ }
+ }
+ return null;
+ }
+
+ public static void appendSources4Dump(Object candidate, StringBuilder builder, int maxScanDepth) {
try {
if (!accessible && first) {
try {
@@ -86,14 +101,14 @@ public static void appendSources4Dump(Object candidate, StringBuilder builder) {
}
if (candidate instanceof OptimizableOperator) {
- OptimizableOperator, ?> operator = ((OptimizableOperator, ?>) candidate).nextOptimizableSource();
- if (operator == null) {
+ OptimizableOperator, ?> closeAssembly = findCloseAssembly((OptimizableOperator, ?>) candidate, maxScanDepth);
+ if (closeAssembly == null) {
return;
}
- String p1 = operator.toString();
+ String p1 = closeAssembly.toString();
builder.append(" (<-) ").append(p1);
if (p1.startsWith("checkpoint")) {
- OptimizableOperator, ?> operator2 = operator.nextOptimizableSource();
+ OptimizableOperator, ?> operator2 = closeAssembly.nextOptimizableSource();
if (operator2 != null) {
builder.append(" (<-) ").append(operator2.toString());
}
diff --git a/scouter.agent.java/src/main/java/scouter/agent/Configure.java b/scouter.agent.java/src/main/java/scouter/agent/Configure.java
index 28c676ba0..0c49cc7dd 100644
--- a/scouter.agent.java/src/main/java/scouter/agent/Configure.java
+++ b/scouter.agent.java/src/main/java/scouter/agent/Configure.java
@@ -198,6 +198,8 @@ public static final Configure getInstance() {
@ConfigDesc("profile reactor's important checkpoint")
public boolean profile_reactor_checkpoint_enabled = true;
+ @ConfigDesc("reactor's important checkpoint scan depth")
+ public int profile_reactor_checkpoint_search_depth = 5;
@ConfigDesc("profile reactor's another checkpoints")
public boolean profile_reactor_more_checkpoint_enabled = false;
@@ -597,6 +599,8 @@ public static final Configure getInstance() {
public boolean hook_method_access_none_enabled = false;
@ConfigDesc("Activating lambda Method hooking")
public boolean hook_method_lambda_enable = true;
+ @ConfigDesc("Activating anonymous Method hooking")
+ public boolean hook_method_anonymous_enable = true;
@ConfigDesc("Method set for service hooking")
@ConfigValueType(ValueType.COMMA_SEPARATED_VALUE)
@@ -989,6 +993,7 @@ private void apply() {
this.hook_method_access_private_enabled = getBoolean("hook_method_access_private_enabled", false);
this.hook_method_access_none_enabled = getBoolean("hook_method_access_none_enabled", false);
this.hook_method_lambda_enable = getBoolean("hook_method_lambda_enable", true);
+ this.hook_method_anonymous_enable = getBoolean("hook_method_anonymous_enable", true);
this.hook_method_ignore_prefixes = StringUtil.removeWhitespace(getValue("hook_method_ignore_prefixes", "get,set"));
this._hook_method_ignore_prefix = StringUtil.split(this.hook_method_ignore_prefixes, ",");
@@ -1087,6 +1092,7 @@ private void apply() {
this.profile_elasticsearch_full_query_enabled = getBoolean("profile_elasticsearch_full_query_enabled", false);
this.profile_reactor_checkpoint_enabled = getBoolean("profile_reactor_checkpoint_enabled", true);
+ this.profile_reactor_checkpoint_search_depth = getInt("profile_reactor_checkpoint_search_depth", 5);
this.profile_reactor_more_checkpoint_enabled = getBoolean("profile_reactor_more_checkpoint_enabled", false);
this.net_udp_collection_interval_ms = getInt("net_udp_collection_interval_ms", 100);
diff --git a/scouter.agent.java/src/main/java/scouter/agent/asm/MethodASM.java b/scouter.agent.java/src/main/java/scouter/agent/asm/MethodASM.java
index 52a8e84ae..ff38ff170 100644
--- a/scouter.agent.java/src/main/java/scouter/agent/asm/MethodASM.java
+++ b/scouter.agent.java/src/main/java/scouter/agent/asm/MethodASM.java
@@ -74,6 +74,10 @@ public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc class
if (conf.isIgnoreMethodClass(className))
return cv;
+ if (!conf.hook_method_anonymous_enable && classIsAnnon(className)) {
+ return cv;
+ }
+
for (int i = 0; i < target.size(); i++) {
HookingSet mset = target.get(i);
if (mset.classMatch.include(className)) {
@@ -82,6 +86,15 @@ public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc class
}
return cv;
}
+
+ private boolean classIsAnnon(String className) {
+ int spIndex = className.lastIndexOf('$');
+ if (spIndex > 0 && spIndex < className.length() - 1) {
+ char dig = className.charAt(spIndex + 1);
+ return dig >= 48 && dig <= 57;
+ }
+ return false;
+ }
}
class MethodCV extends ClassVisitor implements Opcodes {
diff --git a/scouter.agent.java/src/main/java/scouter/agent/proxy/HttpTraceFactory.java b/scouter.agent.java/src/main/java/scouter/agent/proxy/HttpTraceFactory.java
index c5eec330e..b440d3950 100644
--- a/scouter.agent.java/src/main/java/scouter/agent/proxy/HttpTraceFactory.java
+++ b/scouter.agent.java/src/main/java/scouter/agent/proxy/HttpTraceFactory.java
@@ -40,6 +40,9 @@ public String getCookie(Object req, String key) {
public String getRequestURI(Object req) {
return null;
}
+ public String getRequestId(Object req) {
+ return null;
+ }
public String getRemoteAddr(Object req) {
return null;
}
diff --git a/scouter.agent.java/src/main/java/scouter/agent/proxy/IHttpTrace.java b/scouter.agent.java/src/main/java/scouter/agent/proxy/IHttpTrace.java
index b24759784..4de54b612 100644
--- a/scouter.agent.java/src/main/java/scouter/agent/proxy/IHttpTrace.java
+++ b/scouter.agent.java/src/main/java/scouter/agent/proxy/IHttpTrace.java
@@ -35,6 +35,7 @@ public interface IHttpTrace {
String getHeader(Object req, String key);
String getCookie(Object req, String key);
String getRequestURI(Object req);
+ String getRequestId(Object req);
String getRemoteAddr(Object req);
String getMethod(Object req);
String getQueryString(Object req);
diff --git a/scouter.agent.java/src/main/java/scouter/agent/trace/TraceContext.java b/scouter.agent.java/src/main/java/scouter/agent/trace/TraceContext.java
index 72e775fd9..e08d8ef6d 100644
--- a/scouter.agent.java/src/main/java/scouter/agent/trace/TraceContext.java
+++ b/scouter.agent.java/src/main/java/scouter/agent/trace/TraceContext.java
@@ -57,6 +57,7 @@ public enum GetBy {
public boolean isReactiveStarted;
public boolean isReactiveTxidMarked;
public long exchangeHashCode;
+ public String serverReqId;
public boolean isCoroutineStarted;
public boolean isOnCoroutineIdUpdating;
@@ -77,8 +78,8 @@ public void initScannables() {
scannables.setMax(10000);
}
- public Object req;
- public Object res;
+ public Object _req;
+ public Object _res;
public IHttpTrace http;
public TraceContext parent;
diff --git a/scouter.agent.java/src/main/java/scouter/agent/trace/TraceContextManager.java b/scouter.agent.java/src/main/java/scouter/agent/trace/TraceContextManager.java
index 5dd4a901a..fd4c8bf3c 100644
--- a/scouter.agent.java/src/main/java/scouter/agent/trace/TraceContextManager.java
+++ b/scouter.agent.java/src/main/java/scouter/agent/trace/TraceContextManager.java
@@ -262,6 +262,8 @@ public static void completeDeferred(TraceContext o) {
}
public static void clearAllContext(TraceContext o) {
+ o._req = null;
+ o._res = null;
local.set(null);
coroutineDebuggingLocal.clear(); //it should be prev of txidLocal clear
diff --git a/scouter.agent.java/src/main/java/scouter/agent/trace/TraceMain.java b/scouter.agent.java/src/main/java/scouter/agent/trace/TraceMain.java
index 7c01d6ff2..b1d428c10 100644
--- a/scouter.agent.java/src/main/java/scouter/agent/trace/TraceMain.java
+++ b/scouter.agent.java/src/main/java/scouter/agent/trace/TraceMain.java
@@ -160,8 +160,15 @@ public static void startReactiveHttpService(Object exchange) {
try {
Object req = AbstractPlugin.invokeMethod(exchange, "getRequest");
Object res = AbstractPlugin.invokeMethod(exchange, "getResponse");
+ if (reactiveHttp == null) {
+ initReactiveHttp(req);
+ }
+ String serverReqId = reactiveHttp.getRequestId(req);
TraceContext ctx = TraceContextManager.getContext();
+ if (ctx != null && serverReqId != null && ctx.serverReqId == serverReqId) {
+ return;
+ }
if (ctx != null && ctx.exchangeHashCode != exchange.hashCode()) {
//Logger.trace("exchange hash is different on context : " + exchange.hashCode() + " : " + ctx.exchangeHashCode);
ctx = null;
@@ -287,9 +294,6 @@ private static void addHttpServiceName(TraceContext ctx, Object req) {
private static Object lock = new Object();
private static Object startReactiveHttp(Object req, Object res, Object exchange) {
- if (reactiveHttp == null) {
- initReactiveHttp(req);
- }
return startHttp(req, res, reactiveHttp, true, exchange);
}
@@ -307,6 +311,7 @@ private static Object startHttp(Object req, Object res, IHttpTrace http0, boolea
ctx.initScannables();
ctx.isReactiveStarted = true;
ctx.exchangeHashCode = exchange.hashCode();
+ ctx.serverReqId = reactiveHttp.getRequestId(req);
}
ctx.thread = Thread.currentThread();
ctx.threadId = ctx.thread.getId();
@@ -323,8 +328,8 @@ private static Object startHttp(Object req, Object res, IHttpTrace http0, boolea
ctx.profile.add(step);
http0.start(ctx, req, res);
- ctx.req = req;
- ctx.res = res;
+ ctx._req = req;
+ ctx._res = res;
ctx.http = http0;
if (ctx.isFullyDiscardService) {
@@ -382,7 +387,7 @@ public static void endReactiveHttpService() {
if (context == null) {
return;
}
- Stat stat = new Stat(context, context.req, context.res);
+ Stat stat = new Stat(context, context._req, context._res);
endHttpService(stat, null);
}
@@ -396,7 +401,7 @@ public static void endCanceledHttpService(TraceContext traceContext) {
step.start_time = (int) (System.currentTimeMillis() - traceContext.startTime);
traceContext.profile.add(step);
- endHttpService(new Stat(traceContext), null);
+ endHttpService(new Stat(traceContext, traceContext._req, traceContext._res), null);
}
}
@@ -418,7 +423,11 @@ public static void endHttpService(Object stat, Throwable thr) {
//wait on async servlet completion
if (!ctx.asyncServletStarted) {
- endHttpServiceFinal(ctx, ctx.req, ctx.res, thr);
+ Object req = ctx._req;
+ Object res = ctx._res;
+ ctx._req = null;
+ ctx._res = null;
+ endHttpServiceFinal(ctx, req, res, thr);
} else {
HashedMessageStep step = new HashedMessageStep();
step.time = -1;
diff --git a/scouter.agent.java/src/main/java/scouter/agent/util/Tuple.java b/scouter.agent.java/src/main/java/scouter/agent/util/Tuple.java
new file mode 100644
index 000000000..2c44bd1d6
--- /dev/null
+++ b/scouter.agent.java/src/main/java/scouter/agent/util/Tuple.java
@@ -0,0 +1,33 @@
+package scouter.agent.util;
+/*
+ * Copyright 2015 the original author or authors.
+ * @https://github.com/scouter-project/scouter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Created by Gun Lee(gunlee01@gmail.com) on 2020/10/15
+ */
+public class Tuple {
+
+ public static class StringLongPair {
+ public String aString;
+ public long aLong;
+
+ public StringLongPair(String aString, long aLong) {
+ this.aString = aString;
+ this.aLong = aLong;
+ }
+ }
+}
diff --git a/scouter.agent.java/src/main/java/scouter/xtra/http/HttpTrace.java b/scouter.agent.java/src/main/java/scouter/xtra/http/HttpTrace.java
index 6bd2f2560..7950bfef8 100644
--- a/scouter.agent.java/src/main/java/scouter/xtra/http/HttpTrace.java
+++ b/scouter.agent.java/src/main/java/scouter/xtra/http/HttpTrace.java
@@ -159,6 +159,11 @@ public String getRequestURI(Object req) {
return getRequestURI(request);
}
+ @Override
+ public String getRequestId(Object req) {
+ return null;
+ }
+
@Override
public String getRemoteAddr(Object req) {
HttpServletRequest request = (HttpServletRequest) req;
@@ -302,7 +307,11 @@ public void start(TraceContext ctx, Object req, Object res) {
if (b3ModeValid) {
ctx.gxid = HexCodec.lowerHexToUnsignedLong(b3TraceId);
ctx.txid = HexCodec.lowerHexToUnsignedLong(request.getHeader(B3Constant.B3_HEADER_SPANID));
- ctx.caller = HexCodec.lowerHexToUnsignedLong(request.getHeader(B3Constant.B3_HEADER_PARENTSPANID));
+ String caller = request.getHeader(B3Constant.B3_HEADER_PARENTSPANID);
+ if (caller != null) {
+ ctx.caller = HexCodec.lowerHexToUnsignedLong(caller);
+ ctx.is_child_tx = true;
+ }
ctx.b3Mode = true;
ctx.b3Traceid = b3TraceId;
diff --git a/scouter.agent.java/src/main/java/scouter/xtra/http/WebfluxHttpTrace.java b/scouter.agent.java/src/main/java/scouter/xtra/http/WebfluxHttpTrace.java
index bed41e85b..5ed3e982f 100644
--- a/scouter.agent.java/src/main/java/scouter/xtra/http/WebfluxHttpTrace.java
+++ b/scouter.agent.java/src/main/java/scouter/xtra/http/WebfluxHttpTrace.java
@@ -156,6 +156,12 @@ public String getRequestURI(Object req) {
return getRequestURI((ServerHttpRequest) req);
}
+ @Override
+ public String getRequestId(Object req) {
+ ServerHttpRequest request = (ServerHttpRequest) req;
+ return request.getId();
+ }
+
@Override
public String getRemoteAddr(Object req) {
return getRemoteAddr((ServerHttpRequest) req);
@@ -272,7 +278,11 @@ public void start(TraceContext ctx, Object req, Object res) {
if (b3ModeValid) {
ctx.gxid = HexCodec.lowerHexToUnsignedLong(b3TraceId);
ctx.txid = HexCodec.lowerHexToUnsignedLong(getHeader(request, B3Constant.B3_HEADER_SPANID));
- ctx.caller = HexCodec.lowerHexToUnsignedLong(getHeader(request, B3Constant.B3_HEADER_PARENTSPANID));
+ String caller = getHeader(request, B3Constant.B3_HEADER_PARENTSPANID);
+ if (caller != null) {
+ ctx.caller = HexCodec.lowerHexToUnsignedLong(caller);
+ ctx.is_child_tx = true;
+ }
ctx.b3Mode = true;
ctx.b3Traceid = b3TraceId;
diff --git a/scouter.agent.java/src/main/java/scouter/xtra/java8/ElasticSearchTracer.java b/scouter.agent.java/src/main/java/scouter/xtra/java8/ElasticSearchTracer.java
index 83aed6e04..d00c905dd 100644
--- a/scouter.agent.java/src/main/java/scouter/xtra/java8/ElasticSearchTracer.java
+++ b/scouter.agent.java/src/main/java/scouter/xtra/java8/ElasticSearchTracer.java
@@ -70,7 +70,13 @@ private String getRequestDescription0(Object httpRequestBase0, boolean cut) {
return StringUtil.limiting(url, 45);
}
HttpEntity entity = requestBase.getEntity();
+ if (entity == null) {
+ return StringUtil.limiting(url, 45);
+ }
try {
+ if (err) {
+ return StringUtil.limiting(url, 45);
+ }
Class extends HttpEntity> clazz = entity.getClass();
Field field = fieldMap.get(clazz);
if (field == null) {
@@ -79,7 +85,7 @@ private String getRequestDescription0(Object httpRequestBase0, boolean cut) {
}
Object entityDesc = field.get(entity);
if (entityDesc == null) {
- return url;
+ return StringUtil.limiting(url, 45);
} else {
String append = entityDesc instanceof byte[] ? new String((byte[]) entityDesc)
: entityDesc.toString();
@@ -88,12 +94,12 @@ private String getRequestDescription0(Object httpRequestBase0, boolean cut) {
} catch (Exception e) {
err = true;
Logger.println("G177p", "error, so skip it later.", e);
- return "No info";
+ return StringUtil.limiting(url, 45);
}
} else {
String url = httpRequestBase0.toString();
- if (!conf.profile_elasticsearch_full_query_enabled) {
+ if (cut) {
return StringUtil.limiting(url, 45);
}
return url;
diff --git a/scouter.agent.java/src/main/java/scouter/xtra/reactive/ReactiveSupport.java b/scouter.agent.java/src/main/java/scouter/xtra/reactive/ReactiveSupport.java
index 474ae2989..0a7918e54 100644
--- a/scouter.agent.java/src/main/java/scouter/xtra/reactive/ReactiveSupport.java
+++ b/scouter.agent.java/src/main/java/scouter/xtra/reactive/ReactiveSupport.java
@@ -40,6 +40,7 @@
import scouter.agent.trace.TraceContext;
import scouter.agent.trace.TraceContextManager;
import scouter.agent.trace.TraceMain;
+import scouter.agent.util.Tuple;
import scouter.lang.enumeration.ParameterizedMessageLevel;
import scouter.lang.step.ParameterizedMessageStep;
import scouter.util.StringUtil;
@@ -176,7 +177,10 @@ public TxidLifter(CoreSubscriber coreSubscriber, Scannable scannable, Publish
this.publisher = publisher;
this.traceContext = traceContext;
- checkpointDesc = ScouterOptimizableOperatorProxy.nameOnCheckpoint(scannable);
+ Tuple.StringLongPair checkpointPair = ScouterOptimizableOperatorProxy
+ .nameOnCheckpoint(scannable, configure.profile_reactor_checkpoint_search_depth);
+ checkpointDesc = checkpointPair.aString;
+
Integer parentDepth = context.getOrDefault(SubscribeDepth.class, 0);
depth = (!"".equals(checkpointDesc)) ? parentDepth + 1 : parentDepth;
this.ctx = context.put(SubscribeDepth.class, depth);
@@ -301,7 +305,7 @@ private void profileCheckPoint(Scannable scannable, TraceContext traceContext, R
}
String message = messageBuilder.append(scannable.name())
- .append("] close checkpoint -> ")
+ .append("] near-cp -> ")
.append(checkpointDesc).toString();
ParameterizedMessageStep step = new ParameterizedMessageStep();
@@ -320,7 +324,6 @@ private void profileCheckPoint(Scannable scannable, TraceContext traceContext, R
}
public String dumpScannable(TraceContext traceContext, TraceContext.TimedScannable timedScannable, long now) {
-
if (traceContext == null || timedScannable == null) {
return null;
}
@@ -329,7 +332,7 @@ public String dumpScannable(TraceContext traceContext, TraceContext.TimedScannab
StringBuilder builder = new StringBuilder(1000)
.append(scannable.name()).append(" ").append(duration).append("ms");
- ScouterOptimizableOperatorProxy.appendSources4Dump(scannable, builder);
+ ScouterOptimizableOperatorProxy.appendSources4Dump(scannable, builder, configure.profile_reactor_checkpoint_search_depth);
return builder.toString();
}
}
diff --git a/scouter.common/pom.xml b/scouter.common/pom.xml
index bd0eacff6..6d961043f 100644
--- a/scouter.common/pom.xml
+++ b/scouter.common/pom.xml
@@ -4,7 +4,7 @@
io.github.scouter-project
scouter-parent
- 2.10.0
+ 2.10.2
scouter-common
diff --git a/scouter.common/src/main/java/scouter/util/SystemUtil.java b/scouter.common/src/main/java/scouter/util/SystemUtil.java
index ff9370680..3ee386fa3 100644
--- a/scouter.common/src/main/java/scouter/util/SystemUtil.java
+++ b/scouter.common/src/main/java/scouter/util/SystemUtil.java
@@ -21,6 +21,8 @@
*
*/package scouter.util;
+import java.io.File;
+
public class SystemUtil {
public static final String USER_NAME = System.getProperty("user.name");
@@ -45,6 +47,15 @@ public class SystemUtil {
public static final boolean IS_MAC_OSX = OS_NAME.startsWith("Mac OS X");
public static final boolean IS_WINDOWS = OS_NAME.indexOf("Windows") >= 0;
+ public static boolean IS_CONTAINER = false;
+
+ static {
+ try {
+ File file = new File("/.dockerenv");
+ IS_CONTAINER = file.exists() || System.getenv("KUBERNETES_SERVICE_HOST") != null;
+ } catch (Throwable e) {}
+ }
+
public static void main(String[] args) {
System.out.println(OS_NAME);
}
diff --git a/scouter.deploy/pom.xml b/scouter.deploy/pom.xml
index dfdac6321..2ab4145be 100644
--- a/scouter.deploy/pom.xml
+++ b/scouter.deploy/pom.xml
@@ -4,7 +4,7 @@
io.github.scouter-project
scouter-parent
- 2.10.0
+ 2.10.2
scouter-deploy
diff --git a/scouter.server.boot/pom.xml b/scouter.server.boot/pom.xml
index 13e08bac4..735cdbad8 100644
--- a/scouter.server.boot/pom.xml
+++ b/scouter.server.boot/pom.xml
@@ -4,7 +4,7 @@
io.github.scouter-project
scouter-parent
- 2.10.0
+ 2.10.2
scouter-server-boot
diff --git a/scouter.server/pom.xml b/scouter.server/pom.xml
index 69426828c..04bb499de 100644
--- a/scouter.server/pom.xml
+++ b/scouter.server/pom.xml
@@ -4,7 +4,7 @@
io.github.scouter-project
scouter-parent
- 2.10.0
+ 2.10.2
scouter-server
diff --git a/scouter.webapp/pom.xml b/scouter.webapp/pom.xml
index 093672d17..a25158b32 100644
--- a/scouter.webapp/pom.xml
+++ b/scouter.webapp/pom.xml
@@ -5,7 +5,7 @@
io.github.scouter-project
scouter-parent
- 2.10.0
+ 2.10.2
4.0.0