Tracing: send stop tracing to late agents

To make the status of tracing agents and the tracing coordinator
consistent, we make the tracing coordinator ALWAYS send the last
start/stop tracing signal to agents when they register. This way, agents
can make sure their tracing status is the same as the coordinator

If an agent registers after StopAndFlush is received by the
coordinator and the coordinator has already gathered trace data from all
agents with that label, we send a no-op recorder to the agent and
discard its data (we just want to let it know tracing is stopped). If
the coordinator is still gathering data, then an actual recorder is sent
and the agents data is collected.

Bug: 911839
Change-Id: If43ae0490fd5286b62a6ae2a9b235dea16275ff4
Commit-Queue: Ehsan Chiniforooshan <>
Reviewed-by: oysteine <>
Cr-Commit-Position: refs/heads/master@{#616811}
9 files changed