private void transfer(TraceContext ctx, HttpURLConnection urlCon, long calleeTxid) { Configure conf = Configure.getInstance(); if (conf.trace_interservice_enabled) { if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } try { urlCon.setRequestProperty(conf._trace_interservice_gxid_header_key, Hexa32.toString32(ctx.gxid)); urlCon.setRequestProperty(conf._trace_interservice_callee_header_key, Hexa32.toString32(calleeTxid)); urlCon.setRequestProperty(conf._trace_interservice_caller_header_key, Hexa32.toString32(ctx.txid)); urlCon.setRequestProperty(conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); urlCon.setRequestProperty(B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); urlCon.setRequestProperty(B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); urlCon.setRequestProperty(B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(calleeTxid)); PluginHttpCallTrace.call(ctx, urlCon); } catch (Throwable t) { } } }
private void transfer(IHttpClient httpclient, TraceContext ctx, Object req, long calleeTxid) { Configure conf = Configure.getInstance(); if (conf.trace_interservice_enabled) { try { if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } httpclient.addHeader(req, conf._trace_interservice_gxid_header_key, Hexa32.toString32(ctx.gxid)); httpclient.addHeader(req, conf._trace_interservice_caller_header_key, Hexa32.toString32(ctx.txid)); httpclient.addHeader(req, conf._trace_interservice_callee_header_key, Hexa32.toString32(calleeTxid)); httpclient.addHeader(req, conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); httpclient.addHeader(req, B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); httpclient.addHeader(req, B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); httpclient.addHeader(req, B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(calleeTxid)); PluginHttpCallTrace.call(ctx, httpclient, req); } catch (Exception e) { } } }
private void transfer(IHttpClient httpclient, TraceContext ctx, Object req, long calleeTxid) { Configure conf = Configure.getInstance(); if (conf.trace_interservice_enabled) { try { if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } httpclient.addHeader(req, conf._trace_interservice_gxid_header_key, Hexa32.toString32(ctx.gxid)); httpclient.addHeader(req, conf._trace_interservice_caller_header_key, Hexa32.toString32(ctx.txid)); httpclient.addHeader(req, conf._trace_interservice_callee_header_key, Hexa32.toString32(calleeTxid)); httpclient.addHeader(req, conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); httpclient.addHeader(req, B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); httpclient.addHeader(req, B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); httpclient.addHeader(req, B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(calleeTxid)); PluginHttpCallTrace.call(ctx, httpclient, req); } catch (Exception e) { } } }
private void transfer(IHttpClient httpclient, TraceContext ctx, Object host, Object req, long calleeTxid) { Configure conf = Configure.getInstance(); if (conf.trace_interservice_enabled) { try { if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } httpclient.addHeader(req, conf._trace_interservice_gxid_header_key, Hexa32.toString32(ctx.gxid)); httpclient.addHeader(req, conf._trace_interservice_caller_header_key, Hexa32.toString32(ctx.txid)); httpclient.addHeader(req, conf._trace_interservice_callee_header_key, Hexa32.toString32(calleeTxid)); httpclient.addHeader(req, conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); httpclient.addHeader(req, B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); httpclient.addHeader(req, B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); httpclient.addHeader(req, B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(calleeTxid)); PluginHttpCallTrace.call(ctx, req); } catch (Exception e) { Logger.println("A178", e); ok = false; } } } }
private void transfer(IHttpClient httpclient, TraceContext ctx, Object host, Object req, long calleeTxid) { Configure conf = Configure.getInstance(); if (conf.trace_interservice_enabled) { try { if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } httpclient.addHeader(req, conf._trace_interservice_gxid_header_key, Hexa32.toString32(ctx.gxid)); httpclient.addHeader(req, conf._trace_interservice_caller_header_key, Hexa32.toString32(ctx.txid)); httpclient.addHeader(req, conf._trace_interservice_callee_header_key, Hexa32.toString32(calleeTxid)); httpclient.addHeader(req, conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); httpclient.addHeader(req, B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); httpclient.addHeader(req, B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); httpclient.addHeader(req, B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(calleeTxid)); //httpclient.addHeader(oRtn, B3Constant.B3_HEADER_SAMPLED, "1"); omit means defer PluginHttpCallTrace.call(ctx, req); } catch (Throwable e) { Logger.println("A001", e); ok = false; } } } }
httpclient.addHeader(oRtn, conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); httpclient.addHeader(oRtn, B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); httpclient.addHeader(oRtn, B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); httpclient.addHeader(oRtn, B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(ctx.lastApiCallStep.txid));
private void transfer(TraceContext ctx, HttpURLConnection urlCon, long calleeTxid) { Configure conf = Configure.getInstance(); if (conf.trace_interservice_enabled) { if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } try { urlCon.setRequestProperty(conf._trace_interservice_gxid_header_key, Hexa32.toString32(ctx.gxid)); urlCon.setRequestProperty(conf._trace_interservice_callee_header_key, Hexa32.toString32(calleeTxid)); urlCon.setRequestProperty(conf._trace_interservice_caller_header_key, Hexa32.toString32(ctx.txid)); urlCon.setRequestProperty(conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); urlCon.setRequestProperty(B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); urlCon.setRequestProperty(B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); urlCon.setRequestProperty(B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(calleeTxid)); PluginHttpCallTrace.call(ctx, urlCon); } catch (Throwable t) { } } }
private void transfer(IHttpClient httpclient, TraceContext ctx, Object req, long calleeTxid) { Configure conf = Configure.getInstance(); if (conf.trace_interservice_enabled) { try { if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } httpclient.addHeader(req, conf._trace_interservice_gxid_header_key, Hexa32.toString32(ctx.gxid)); httpclient.addHeader(req, conf._trace_interservice_caller_header_key, Hexa32.toString32(ctx.txid)); httpclient.addHeader(req, conf._trace_interservice_callee_header_key, Hexa32.toString32(calleeTxid)); httpclient.addHeader(req, conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); httpclient.addHeader(req, B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); httpclient.addHeader(req, B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); httpclient.addHeader(req, B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(calleeTxid)); PluginHttpCallTrace.call(ctx, httpclient, req); } catch (Exception e) { } } }
private void transfer(IHttpClient httpclient, TraceContext ctx, Object req, long calleeTxid) { Configure conf = Configure.getInstance(); if (conf.trace_interservice_enabled) { try { if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } httpclient.addHeader(req, conf._trace_interservice_gxid_header_key, Hexa32.toString32(ctx.gxid)); httpclient.addHeader(req, conf._trace_interservice_caller_header_key, Hexa32.toString32(ctx.txid)); httpclient.addHeader(req, conf._trace_interservice_callee_header_key, Hexa32.toString32(calleeTxid)); httpclient.addHeader(req, conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); httpclient.addHeader(req, B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); httpclient.addHeader(req, B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); httpclient.addHeader(req, B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(calleeTxid)); PluginHttpCallTrace.call(ctx, httpclient, req); } catch (Exception e) { } } }
private void transfer(IHttpClient httpclient, TraceContext ctx, Object host, Object req, long calleeTxid) { Configure conf = Configure.getInstance(); if (conf.trace_interservice_enabled) { try { if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } httpclient.addHeader(req, conf._trace_interservice_gxid_header_key, Hexa32.toString32(ctx.gxid)); httpclient.addHeader(req, conf._trace_interservice_caller_header_key, Hexa32.toString32(ctx.txid)); httpclient.addHeader(req, conf._trace_interservice_callee_header_key, Hexa32.toString32(calleeTxid)); httpclient.addHeader(req, conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); httpclient.addHeader(req, B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); httpclient.addHeader(req, B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); httpclient.addHeader(req, B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(calleeTxid)); PluginHttpCallTrace.call(ctx, req); } catch (Exception e) { Logger.println("A178", e); ok = false; } } } }
httpclient.addHeader(oRtn, conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); httpclient.addHeader(oRtn, B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); httpclient.addHeader(oRtn, B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); httpclient.addHeader(oRtn, B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(ctx.lastApiCallStep.txid));
private void transfer(IHttpClient httpclient, TraceContext ctx, Object host, Object req, long calleeTxid) { Configure conf = Configure.getInstance(); if (conf.trace_interservice_enabled) { try { if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } httpclient.addHeader(req, conf._trace_interservice_gxid_header_key, Hexa32.toString32(ctx.gxid)); httpclient.addHeader(req, conf._trace_interservice_caller_header_key, Hexa32.toString32(ctx.txid)); httpclient.addHeader(req, conf._trace_interservice_callee_header_key, Hexa32.toString32(calleeTxid)); httpclient.addHeader(req, conf._trace_interservice_caller_obj_header_key, String.valueOf(conf.getObjHash())); httpclient.addHeader(req, B3Constant.B3_HEADER_TRACEID, Hexa32.toUnsignedLongHex(ctx.gxid)); httpclient.addHeader(req, B3Constant.B3_HEADER_PARENTSPANID, Hexa32.toUnsignedLongHex(ctx.txid)); httpclient.addHeader(req, B3Constant.B3_HEADER_SPANID, Hexa32.toUnsignedLongHex(calleeTxid)); //httpclient.addHeader(oRtn, B3Constant.B3_HEADER_SAMPLED, "1"); omit means defer PluginHttpCallTrace.call(ctx, req); } catch (Throwable e) { Logger.println("A001", e); ok = false; } } } }