Open mjneth opened 1 week ago
@mjneth Thank you for opening this issue. Can you try using an ARM image to see if the problem relates to qemu?
@mjneth Thank you for opening this issue. Can you try using an ARM image to see if the problem relates to qemu?
It does work with an ARM image but our production images are x86_64 so we want to use the same in the docker-compose setups for local dev. Is it feasible for this to work with qemu?
@mjneth From the ps
output you attached, it seems that the actual process being run is qemu one which emulates the go binary, if that is the case then our current implementation won't support it since we are looking for a running go executable.
Describe the bug
When running otel-go-instrumentation in the same container as the app it errors with "process not found yet, trying again soon".
The sidecar approach needing to run as privileged is a concern for us so I was seeing if this can work if otel-go-instrumentation is run in the same container as the app being instrumented.
Environment
To Reproduce
Dockerfile:
docker-compose.yaml:
Test app to be instrumented:
Run the app and otel-go-instrumentation in the same container:
docker-compose run app
.go build .
./app/oteltest &
.otel-go-instrumentation --log-level=debug
.It fails to find the app process with the error:
Though the process can be seen by
ps -ef
:root 2394 2102 0 15:15 pts/0 00:00:00 /usr/bin/qemu-x86_64 /app/oteltest /app/oteltest
.I tried setting
OTEL_GO_AUTO_TARGET_EXE
to how it shows inps -ef
and some variations of that to see if it's an issue with being an ARM mac host machine and x86_64 container since the process output shows qemu-x86_64. I also tried running/app/oteltest
in the container from one terminal and exec'd into the container a second time from another terminal to runotel-go-instrumentation
and still had the same error.Expected behavior
The otel-go-instrumentation binary is able to find the test app process, instrument it, and send traces to OTEL_EXPORTER_OTLP_ENDPOINT.
Additional context
I'm not sure if this is considered a supported flow or not but the sidecar approach requiring being run as privileged or needing additional capabilities is a concern. I'm curious if the stance here is to use the privileged sidecar approach or instrument your go app in the app-code instead and there isn't intended to be a way to auto-instrument without a privileged container.