Closed
Description
Component(s)
processor/resourcedetection, processor/resourcedetection/internal/docker
What happened?
Description
I'm running a container of this project with the resourcedetectionprocessor/docker.
The corresponding config looks like this:
processors:
resourcedetection:
detectors: [docker]
After a system restart the resource detector loses it's functionallity (the lables from the docker host are no longer picked up) and the following message shows up in the log:
warn internal/resourcedetection.go:130 failed to detect resource {"kind": "processor", "name": "resourcedetection", "pipeline": "logs", "error": "failed getting OS type: failed to fetch Docker OS type: Get \"http://%2Fvar%2Frun%2Fdocker.sock/v1.46/info\": context deadline exceeded"}
This is likely because docker is currently starting up.
Possible fixes:
- Retry resource detection for a limited amount of time (a few minutes?)
- Crash the container when this happens so that it can get restarted automatically due to the restart policy
It would be great to also make this configureable.
Collector version
v0.107.0
Environment information
Environment
Ubunut 24.04 LTS
Docker CE 27.1.2
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response