MCPcopy Create free account
hub / github.com/dianping/cat / logRemoteCallServer

Method logRemoteCallServer

cat-client/src/main/java/com/dianping/cat/Cat.java:249–268  ·  view source on GitHub ↗

used in rpc server,use clild id as server message tree id. @param ctx ctx is rpc context ,such as duboo context , please use rpc context implement Context

(Context ctx)

Source from the content-addressed store, hash-verified

247 * ctx is rpc context ,such as duboo context , please use rpc context implement Context
248 */
249 public static void logRemoteCallServer(Context ctx) {
250 try {
251 MessageTree tree = TraceContextHelper.threadLocal().getMessageTree();
252 String childId = ctx.getProperty(Context.CHILD);
253 String rootId = ctx.getProperty(Context.ROOT);
254 String parentId = ctx.getProperty(Context.PARENT);
255
256 if (parentId != null) {
257 tree.setParentMessageId(parentId);
258 }
259 if (rootId != null) {
260 tree.setRootMessageId(rootId);
261 }
262 if (childId != null) {
263 tree.setMessageId(childId);
264 }
265 } catch (Exception e) {
266 errorHandler(e);
267 }
268 }
269
270 public static void logTrace(String type, String name) {
271 try {

Callers

nothing calls this directly

Calls 7

threadLocalMethod · 0.95
setParentMessageIdMethod · 0.95
setRootMessageIdMethod · 0.95
setMessageIdMethod · 0.95
errorHandlerMethod · 0.95
getMessageTreeMethod · 0.65
getPropertyMethod · 0.65

Tested by

no test coverage detected