Last updated: May 7, 2026
Container and Host Resources
This page documents how Dash0 identifies and names container and host resources using OpenTelemetry semantic conventions.
These rules apply to containers running outside of Kubernetes. For Kubernetes pods, see Kubernetes Resources.
Container Equality Rules
Containers running outside Kubernetes are identified by their container ID or name.
For containers not running on Kubernetes (e.g., Docker Desktop), see container semantic conventions:
- By Container ID:
container.id - By Container Name (lower priority):
container.name
container.name has significantly lower precedence than container.id and comes after service triplet equality. If both container.id and service attributes are present, the service triplet takes precedence. Always prefer container.id for reliable container identification.
Container Naming Rules
Container names are derived from either the container name attribute or container ID as a fallback.
| Condition | Name |
|---|---|
container.id or container.name set (non-K8s) | Container name preferred, or ID |
Container Typing Rules
Container types are assigned based on the presence of container attributes.
| Condition | Type | UI Label |
|---|---|---|
container.id set | container | Container |
container.name set (fallback) | container | Container |
Host Equality Rules
Hosts are identified by their host ID, with host name as a lower-priority fallback.
For host-level monitoring, see host semantic conventions:
- By Host ID:
host.id - By Host Name (lowest priority):
host.name
host.id has higher precedence than host.name because hostnames are often misconfigured in containerized environments. The host.name equality rule has the lowest precedence of all resource equality rules, placed below even service fallback.
Host Naming Rules
Host names prefer the host ID for stability, falling back to host name when ID is unavailable.
| Condition | Name |
|---|---|
host.id or host.name set | Host ID preferred, or host name |
Host Typing Rules
Host types are assigned based on the presence of host attributes.
| Condition | Type | UI Label |
|---|---|---|
host.id set | host | Host |
host.name set (fallback) | host | Host |
Best Practices
- Set
container.idfor unique container identification across restarts - Use
host.idas a stable identifier (e.g., machine ID or cloud instance ID) - Include
host.namefor human-readable host identification - Use resource detectors to automatically populate container and host attributes
For host-level monitoring, prefer host.id over host.name as the primary identifier, since host.id remains stable even if the hostname changes.
Further Reading
For more information on resource equality and container/host configurations, explore the following resources.
Related Topics in This Section
- About Resources: Overview of resources in Dash0
- Explore Resources: Get started exploring resources in Dash0
- Why Resource Equality?: Practical examples of resource fragmentation scenarios
Dash0 Guides & Knowledge
- What are OpenTelemetry Resources?: Deep dive into how resources describe which system is generating telemetry data
- Service Attributes Best Practices: Learn what resource attributes are and how they can be categorized
- Kubernetes Attributes Best Practices: Best practices for Kubernetes resource attributes
OpenTelemetry Resources
- Container Semantic Conventions: Official specification for container resource attributes
- Host Semantic Conventions: Official specification for host resource attributes
- OpenTelemetry SDKs: Language-specific SDK documentation