Skip to content

Name the machine: host.name and host.arch on the resource - #63

Merged
sylvesterdamgaard merged 1 commit into
mainfrom
feat/host-name-resource
Sep 26, 2026
Merged

sylvesterdamgaard merged 1 commit into
mainfrom
feat/host-name-resource

Conversation

@sylvesterdamgaard

Copy link
Copy Markdown
Contributor

Resource detection covered container, Kubernetes and cloud identity but never the host itself. On a plain VM or bare-metal box — the most common self-hosted deployment — nothing on the trace says which machine served the request, so anything reading that host's own exporters (node_exporter, a health endpoint) has nothing to join on.

Found while wiring infrastructure discovery in laravel-telemetry-ui: the host-side context could not work against a real stack because the traces carried no host.name.

Inside a container the hostname is the container, which is the right answer from the process's point of view and is already recorded separately as k8s.pod.name where it applies. An operator whose node name differs substitutes it through OTEL_RESOURCE_ATTRIBUTES, which is merged last and wins — there is a test for that.

host.arch is normalised to the semantic conventions' spelling (amd64, arm64) rather than the kernel's x86_64/aarch64.

804 tests.

Detection covered container, Kubernetes and cloud identity but never the
host itself, so a plain VM or bare-metal box — the most common self-hosted
deployment there is — reported nothing that ties a request to the machine
that served it. Anything reading that host's own exporters had nothing to
join on.

Inside a container the hostname is the container, which is the right
answer from the process's point of view; a Kubernetes operator whose node
name differs substitutes it through OTEL_RESOURCE_ATTRIBUTES, which is
merged last and wins. host.arch is spelled the way the semantic
conventions do, amd64 and arm64 rather than the kernel's names.
@sylvesterdamgaard
sylvesterdamgaard merged commit 5e8fa58 into main Sep 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant