Split out enqueue_tracemaybe_flush_traces steps from the :send_trace handler.
Basically no change in behavior except that now we consistently write a log (when verbose?: true) that a trace has been added to the stack at the time that the batch size is reached and the stack is flushed to the Datadog Agent.
While reviewing #28, I noticed that we were missing an obvious place to add telemetry about what the APIServer is doing internally, so I split this out in preparation for adding telemetry about these distinct steps happening.
Split out
enqueue_trace
maybe_flush_traces
steps from the:send_trace
handler. Basically no change in behavior except that now we consistently write a log (whenverbose?: true
) that a trace has been added to the stack at the time that the batch size is reached and the stack is flushed to the Datadog Agent.While reviewing #28, I noticed that we were missing an obvious place to add telemetry about what the APIServer is doing internally, so I split this out in preparation for adding telemetry about these distinct steps happening.