Repository navigation
reporter: emit semconv resource attributes on OTLP output - #3242
Merged
Merged
Conversation
The OTLP/profiles builder copied parca-agent's resource labels verbatim, so consumers saw `comm` and `node` rather than semantic convention keys, and `k8s.node.name` only appeared with a relabel config. - `comm` is emitted as `process.executable.name`, matching upstream's OTLP reporter. A relabel rule targeting that key still wins. - `node` is dropped: `host.name` already carries --node. - `k8s.node.name` is set from --node when running in Kubernetes (KUBERNETES_SERVICE_HOST set), for every process on the node. The per-sample `cpu` label was already emitted as `cpu.logical_number`; a test now pins that no bare `cpu` key reaches OTLP. The arrow backends are unchanged.
gnurizen
marked this pull request as ready for review
October 11, 2026 20:04
Member
I don't see this one. |
brancz
approved these changes
Oct 12, 2026
Contributor
Author
|
We already emit cpu.logical_number so no change was needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The OTLP/profiles builder copied parca-agent's resource labels verbatim, so a
consumer saw
commandnodeinstead of semantic convention keys, andk8s.node.nameonly appeared if the operator used the relabel example inconfig/examples/otlp-semconv-k8s.yaml(and then only for pod processes).Changes (OTLP output only; arrow backends unchanged)
comm(resource)process.executable.name— the key upstream's OTLP reporter uses for commnode(resource)host.namealready carries--nodek8s.node.namefrom--node, whenKUBERNETES_SERVICE_HOSTis setcpu(sample)cpu.logical_number(int) — already the case; now pinned by a testprocess.executable.nameork8s.node.nameexplicitly still overrides the default. The example config keeps its
process.executable.namerule, now documented as replacing the truncatedcomm with the full executable basename, and drops its
k8s.node.namerule.metadata.InKubernetes()is the existingKUBERNETES_SERVICE_HOSTcheck,exported so the builder and the container metadata provider share it.
k8s.node.nameis set on every resource, host processes included: in acluster
--nodemust match the Kubernetes node name.Testing
go test ./reporter/..., including the newTestPprofileSemconvResourceAttrs(comm rename, explicit override, node dropped, in/out of cluster).