Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11622

TraceId hardcoded to 0 in DataStreamer, correlation between multiple spans is lost

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • tracing
    • None

    Description

      In the run() method of DataStreamer class, the following code is written. parents[0] refer to the spanId of the parent span.

                    one = dataQueue.getFirst(); // regular data packet
                    long parents[] = one.getTraceParents();
                    if (parents.length > 0) {
                           scope = Trace.startSpan("dataStreamer", new TraceInfo(0, parents[0]));
                      // TODO: use setParents API once it's available from HTrace 3.2
                      // scope = Trace.startSpan("dataStreamer", Sampler.ALWAYS);
                      // scope.getSpan().setParents(parents);
                    }
      

      The scope starts a new TraceSpan with a traceId hardcoded to 0. Ideally it should be taken when currentPacket.addTraceParent(Trace.currentSpan()) is invoked. This JIRA is to propose an additional long field inside the DFSPacket class which holds the parent traceId.

      Attachments

        Activity

          People

            Unassigned Unassigned
            karanmehta93 Karan Mehta
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: