View Source Datadog.DataStreams.Container (Data Streams Ex v1.2.2)

Logic for linking current running container id to data stream traces.

Summary

Functions

Returns a specification to start this module under a supervisor.

Returns the current container id.

Attempts to return the container id from the provided file stream. Empty on failure.

Attempts to return the container id from the cgroup path (/proc/self/cgroup). Empty on failure.

Attempts to return the container id from the provided file path. Empty on failure.

Starts the agent and stores the current container id in memory.

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec get() :: String.t() | nil

Returns the current container id.

Link to this function

parse_container_id(stream)

View Source

Attempts to return the container id from the provided file stream. Empty on failure.

@spec read_container_id() :: String.t() | nil

Attempts to return the container id from the cgroup path (/proc/self/cgroup). Empty on failure.

@spec read_container_id(String.t()) :: String.t() | nil

Attempts to return the container id from the provided file path. Empty on failure.

Starts the agent and stores the current container id in memory.