Пример #1
0
  public TraceContext createChild() {
    TraceContext child = new TraceContext(this.isSummary);
    child.parent = this;
    child.txid = this.txid;
    child.thread = this.thread;
    child.threadId = this.threadId;
    child.gxid = this.gxid;

    // child.profile = this.profile;

    child.startTime = this.startTime;

    if (this.profile_thread_cputime) {
      child.startCpu = SysJMX.getCurrentThreadCPU();
    }
    child.bytes = this.bytes;
    child.status = this.status;

    child.xType = this.xType;
    child.serviceHash = this.serviceHash;
    child.serviceName = this.serviceName;
    child.remoteIp = this.remoteIp;

    child.http_method = this.http_method;
    child.http_query = this.http_query;
    child.http_content_type = this.http_content_type;

    // child.sqlCount = this.sqlCount;
    // child.sqlTime = this.sqlTime;
    // child.sqltext = this.sqltext;
    // child.apicall_name = this.apicall_name;
    // child.apicall_count = this.apicall_count;
    // child.apicall_time = this.apicall_time;

    // child.rs_start = this.rs_start;
    // child.rs_count = this.rs_count;
    // child.sql = this.sql;

    child.userid = this.userid;
    child.userAgent = this.userAgent;
    child.referer = this.referer;
    // child.opencon = this.opencon;
    child.profile_thread_cputime = this.profile_thread_cputime;
    child.is_child_tx = this.is_child_tx;
    child.caller = this.caller;
    child.callee = this.callee;

    return child;
  }
Пример #2
0
 public void service(String name) {
   if (name == null) return;
   ctx.serviceHash = HashUtil.hash(name);
   ctx.serviceName = name;
 }