1
0
mirror of synced 2026-08-05 23:16:54 +00:00

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

This commit is contained in:
Yury Semikhatsky
2022-01-19 14:55:07 -08:00
committed by GitHub
parent f19cecac20
commit 396d5a7b3e
@@ -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);