opentelemetry-cpp-contrib icon indicating copy to clipboard operation
opentelemetry-cpp-contrib copied to clipboard

Docker image on docker hub

Open teuno opened this issue 4 years ago • 5 comments

Is it possible to have an docker image on dockerhub (or somewhere else)? I am building an example of a system monitored with opentelemetry, but struggeling how to build this project, because I do not have that much experience with building Nginx from source (never done that).

Thanks in advance, both it it happens and if it does not happen.

teuno avatar Apr 14 '21 11:04 teuno

Thanks! I'll look into publishing to Docker hub, I agree building it is not a trivial matter due to requiring building of both gRPC and opentelemetry-cpp.

What platforms did you try to build it on?

We don't have the releases process set up yet (#11), but the CI does build prebuilt binaries on Ubuntu 18.04, 20.04 and 20.10 for both nginx 1.18 and 1.19 which you can grab here: https://github.com/open-telemetry/opentelemetry-cpp-contrib/actions/runs/705078540

I can add additional targeted platforms as well.

seemk avatar Apr 15 '21 07:04 seemk

Hi, atm I have followed https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#modules . Got a working nginx without the grpc and otlp, but kinda stuck after that (the dependencies for building part in https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/nginx ). I build on ubuntu 18.04, so that's one that you already have.

Do you know which --add(-dynamic)-module to add?

teuno avatar Apr 19 '21 08:04 teuno

Just to get an overview of your setup: You are building nginx yourself? If yes, then I think you only need to add --with-compat flag. See https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/nginx#troubleshooting

Are you using the prebuilt .so?

If you are building nginx you don't need to add any -add-*-module for instrumentation module to work, in fact it should work with nginx versions out of the box (with the exception of nginx 1.14 on ubuntu 18.04 default apt - you can get a newer one from nginx packages: https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#installing-a-prebuilt-debian-package-from-an-os-repository)

Then if you have nginx and the instrumentation module .so you can add it to nginx config. Example - https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/nginx#usage

You can check the nginx flags with nginx -V, it should have --with-compat.

seemk avatar Apr 19 '21 08:04 seemk

Thanks for you help (added the --with-compat and it ran send the traces to my collector). Got a local running version without docker atm.

teuno avatar Apr 19 '21 10:04 teuno

#81 I already built a docker image for alpine linux.

iquirino avatar Dec 13 '21 11:12 iquirino