Expand description
Remote agent registration and the services that the Datadog Agent queries.
RemoteAgentBootstrap registers the process with the Datadog Agent over the Remote Agent Registry, keeps that
registration alive, and creates everything that depends on it: the configuration stream, and the workers that serve
the status, flare, and telemetry services and report diagnostic events back to the Datadog Agent.
§Bootstrapping prior to supervision
Registration and the initial configuration are generally required before any decisions can be made about continuing to start up, and this means that a supervision tree is not likely to yet be running where we can spawn our background tasks for managing registration.
The registration loop and the configuration stream loop therefore each start early, in a ResumableWorker, and
run in a task until their worker takes them over in the supervision tree. The worker continues with the same
session, refresh schedule, and open stream, and so does each restart of the worker.
The registration task finishes a registration attempt in flight before it hands over, so a handoff never registers twice. The registration worker shuts down brutally, even in the middle of an attempt, and a restarted worker retries an interrupted attempt right away. Dropping a loop’s worker before it starts cancels the loop.
Structs§
- Config
Stream Worker - A worker that feeds the config stream from
RemoteAgentBootstrap::create_config_stream. - Dataspace
Anchor Worker - A worker that captures the dataspace from the supervisor context and stores it in a shared
OnceLockfor use by the diagnostic artifact collection service. - Remote
Agent Bootstrap - Remote agent initialization.
- Remote
Agent Event Reporter - A worker that reports diagnostic events to the Core Agent as remote agent events.
- Remote
Agent Registration Worker - A worker that keeps the registration with the Core Agent alive.
- Remote
Agent Services Worker - A worker that serves the status, flare, and telemetry services on the privileged API endpoint.
- Status
Builder - Builder for the status details reported to the Datadog Agent.
- Status
Section Writer - Writer for the fields of a single status section.
Traits§
- Status
Section Provider - A provider of status details for the Datadog Agent’s status output.