Package 

Class PendingTrace

  • All Implemented Interfaces:
    com.datadog.trace.bootstrap.instrumentation.api.AgentTrace , com.datadog.trace.core.PendingTraceBuffer.Element

    
    public class PendingTrace
     implements AgentTrace, PendingTraceBuffer.Element
                        

    This class implements the following data flow rules when a Span is finished:

    • Immediate Write
      • pending ref count == 0 && trace not already written
      • not root span && size exceeds partial flush
    • Delayed Write
      • is root span && pending ref count > 0
      • not root span && pending ref count > 0 && trace already written

    Delayed write is handled by PendingTraceBuffer.

    When the long-running traces feature is enabled, periodic writes are triggered by the PendingTraceBuffer in addition to the other write conditions. Running spans are also written in that case.