pub struct CgroupsMetadataCollector { /* private fields */ }Expand description
A metadata collector that observes Linux “Control Groups” (cgroups).
This collector specifically tracks cgroup controllers attached to container workloads using simple regex-based matching against the controller path, and maintains a mapping of controller inodes to the container ID extracted from the controller path.
This is specifically used to support client-based Origin Detection in DogStatsD, where clients will either send their detected container ID or the inode of their cgroup controller. A canonical container ID must always be used for origin enrichment, so this mapping allows resolving controller inodes to their canonical container ID.
Implementations§
Source§impl CgroupsMetadataCollector
impl CgroupsMetadataCollector
Sourcepub async fn new(
cgroups_config: &CgroupsConfiguration,
health: Health,
interner: GenericMapInterner,
) -> Result<Self, GenericError>
pub async fn new( cgroups_config: &CgroupsConfiguration, health: Health, interner: GenericMapInterner, ) -> Result<Self, GenericError>
Creates a new CgroupsMetadataCollector from the given cgroups configuration.
§Errors
If a valid cgroups hierarchy can not be located at the configured path, an error will be returned.
Trait Implementations§
Source§impl MemoryBounds for CgroupsMetadataCollector
impl MemoryBounds for CgroupsMetadataCollector
Source§fn specify_bounds(&self, builder: &mut MemoryBoundsBuilder<'_>)
fn specify_bounds(&self, builder: &mut MemoryBoundsBuilder<'_>)
Auto Trait Implementations§
impl Freeze for CgroupsMetadataCollector
impl !RefUnwindSafe for CgroupsMetadataCollector
impl Send for CgroupsMetadataCollector
impl Sync for CgroupsMetadataCollector
impl Unpin for CgroupsMetadataCollector
impl !UnwindSafe for CgroupsMetadataCollector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more