-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[processor/resourcedetection] system detector sets host.id
to an empty value on containerized setups
#24230
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
cc @sumo-drosiek any ideas on what to do here? What is the behavior you wanted on containerized setups? |
First of all I think that empty |
Reported also upstream: open-telemetry/opentelemetry-go/issues/4312 |
I have a PR upstream: open-telemetry/opentelemetry-go#4317 with a fix, but am uncertain if it is the fix we want. The description on the PR lays out the problem and some possible alternative solutions. Let me know if anyone has thoughts or opinions. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
We can close this, it was fixed upstream and we have a safeguard on the Collector as well |
Component(s)
processor/resourcedetection
What happened?
Description
The
host.id
resource attribute is set by thesystem
detector to an empty string value when running on containerized setups.Steps to Reproduce
Run the Collector contrib Docker image with the configuration provided below. This is also reproducible with custom builds if one has some base images (e.g.
alpine:3.16
).Expected Result
The detector works in accordance to the specification which states that (emphasis mine):
AIUI, an empty string is not valid since it's not unique, and on containerized environments, this should not be the machine-id since a container is not 'really' a host.
My expectation would be either that on containerized environments the
host.id
resource attribute is not set or that it is set to a value that persists across restarts.Actual Result
On v0.80.0, an empty string is set on
host.id
, which is not a "unique host ID". On v0.72.0 up to v0.79.0, a random UUID that varies on each container restart is set onhost.id
.Collector version
v0.80.0
Environment information
Environment
Running the docker image
otel/opentelemetry-collector-contrib:0.80.0
with the configuration provided below reproduces this.OpenTelemetry Collector configuration
Log output
Additional context
Prior to v0.80.0 (in particular, in between v0.72.0 that included #18618 and before #18740) this would generate a random UUID on each container restart. An example run of the same configuration on v0.79.0:
This was reported on #18618 (comment) and happens because this code path is taken on the dependency used by #18618 to run this.
The text was updated successfully, but these errors were encountered: