Uploaded image for project: 'HTrace'
  1. HTrace
  2. HTRACE-324

Document tracer setup, the passing of traces across RPC,

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • docs
    • None

    Description

      Doc why you should create a tracer always and create it early in your process. Then that you should start up a scope near immediately also so that your tracer context is available down the stack if anyone needs to pluck it from current thread context. Explain NPE when you do Tracer.curThreadTracer... and of how to fix and of how early setup allows you avoid this ugly idiom that requires null checks:

      +    Tracer tracer = Tracer.curThreadTracer();
      +    TraceScope scope = tracer == null? null:
      +      tracer.newScope("MemStoreFluser.reclaimMemStoreMemory");
      ...
      
      +    if (scope != null) scope.close();
      

      Doc you should close tracer when done

      Fix the current page because it has deprecated way of setting up a new Tracer using deprecated name method (this may be fixed already, we just haven't pushed it).

      Attachments

        Activity

          People

            Unassigned Unassigned
            stack Michael Stack
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: