pub enum EntityId {
Global,
Container(MetaString),
ContainerImageMetadata(MetaString),
EcsTask(MetaString),
KubernetesDeployment(MetaString),
KubernetesMetadata(MetaString),
KubernetesNode(MetaString),
PodUid(MetaString),
Process(MetaString),
ContainerInode(u64),
ContainerPid(u32),
}Expand description
An entity identifier.
Variants§
Global
The global entity.
Represents the root of the entity hierarchy, which is equivalent to a “global” scope. This is generally used to represent a collection of metadata entries that aren’t associated with any specific entity, but with anything within the workload, such as host or cluster tags.
Container(MetaString)
A container ID.
This is generally a long hexadecimal string, as generally used by container runtimes like containerd.
ContainerImageMetadata(MetaString)
An OCI image manifest digest.
EcsTask(MetaString)
An ECS task ARN.
KubernetesDeployment(MetaString)
A Kubernetes deployment, identified by <namespace>/<name>.
KubernetesMetadata(MetaString)
Kubernetes metadata, such as a namespace path.
KubernetesNode(MetaString)
A Kubernetes node name.
PodUid(MetaString)
A Kubernetes pod UID.
Represents the UUID of a specific Kubernetes pod.
Process(MetaString)
A process identifier reported by the remote tagger.
ContainerInode(u64)
A container inode.
Represents the inode of the cgroups controller for a specific container.
ContainerPid(u32)
A container PID.
Represents the PID of the process within a specific container.
Implementations§
Source§impl EntityId
impl EntityId
Sourcepub fn from_local_data<S>(raw_local_data: S) -> Option<Self>
pub fn from_local_data<S>(raw_local_data: S) -> Option<Self>
Creates an EntityId from Local Data.
This method follows the same logic/behavior as the Datadog Agent’s origin detection logic:
- If the input starts with
ci-, we treat it as a container ID. - If the input starts with
in-, we treat it as a container cgroup controller inode. - If the input contains a comma, we split the input and search for either a prefixed container ID or prefixed inode. If both are present, we use the container ID.
- If the input starts with
cid-, we treat it as a container ID. - If none of the above conditions are met, we assume the entire input is a container ID.
If the input fails to be parsed in a valid fashion (for example, in- prefix but the remainder isn’t a valid
integer), or is empty, None is returned.
Sourcepub fn from_pod_uid<S>(pod_uid: S) -> Option<Self>
pub fn from_pod_uid<S>(pod_uid: S) -> Option<Self>
Creates an EntityId from a Kubernetes pod UID.
If the pod UID value is "none", this will return None.
Sourcepub fn try_into_container(self) -> Option<MetaString>
pub fn try_into_container(self) -> Option<MetaString>
Returns the inner container ID value, if this entity ID is a Container.
Otherwise, None is returned and the original entity ID is consumed.
Trait Implementations§
Source§impl<'a> From<&'a EntityId> for HighestPrecedenceEntityIdRef<'a>
impl<'a> From<&'a EntityId> for HighestPrecedenceEntityIdRef<'a>
impl Eq for EntityId
impl StructuralPartialEq for EntityId
Auto Trait Implementations§
impl Freeze for EntityId
impl RefUnwindSafe for EntityId
impl Send for EntityId
impl Sync for EntityId
impl Unpin for EntityId
impl UnwindSafe for EntityId
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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