1
0
mirror of synced 2026-08-05 15:06:54 +00:00

fix: hide internal call from inspector log (#783)

This commit is contained in:
Yury Semikhatsky
2022-01-19 13:18:47 -08:00
committed by GitHub
parent 897d441c02
commit 2aef5c6742
@@ -121,11 +121,15 @@ public class Connection {
message.addProperty("method", method);
message.add("params", params);
JsonObject metadata = new JsonObject();
if (stackTraceCollector != null) {
metadata.add("stack", stackTraceCollector.currentStackTrace());
}
if (apiName != null) {
if (apiName == null) {
metadata.addProperty("internal", true);
} else {
metadata.addProperty("apiName", apiName);
// All but first message in an API call are considered internal and will be hidden from the inspector.
apiName = null;
if (stackTraceCollector != null) {
metadata.add("stack", stackTraceCollector.currentStackTrace());
}
}
message.add("metadata", metadata);
transport.send(message);