From a6d65f6e9f899f0f0a28c4014dcc0d1d5be660f6 Mon Sep 17 00:00:00 2001 From: Vincent Privat Date: Mon, 18 Nov 2024 18:02:58 +0100 Subject: [PATCH] RSPY-518 - Bootstrap Opentelemetry for rs-server-staging --- services/staging/.github/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/staging/.github/Dockerfile b/services/staging/.github/Dockerfile index 965627574..ce9daa8a2 100644 --- a/services/staging/.github/Dockerfile +++ b/services/staging/.github/Dockerfile @@ -37,7 +37,7 @@ ENV PYGEOAPI_OPENAPI=/opt/config/openapi.json # Install the wheel packages in the right order (dependencies first). # This also installs all the sub-dependencies e.g. fastapi etc ... -RUN cd /tmp/whl && pip install --no-cache-dir rs_server_staging-*.whl +RUN cd /tmp/whl && pip install --no-cache-dir rs_server_common-*.whl rs_server_staging-*.whl # Final stage. Don't use alpine, it's too different from the build stage. FROM python:3.11-slim-bookworm @@ -45,12 +45,15 @@ FROM python:3.11-slim-bookworm # Install dependencies necessary for execution (e.g. libpq) not compilation (gcc) RUN \ apt update && \ - apt install -y libpq-dev && \ + apt install -y libpq-dev libexpat1 && \ rm -rf /var/cache/apt/archives /var/lib/apt/lists/* # Copy the whole /usr/local dir (that contains the python installation) from the build stage COPY --from=builder /usr/local /usr/local +# Install opentelemetry instrumentation packages for dependencies +RUN opentelemetry-bootstrap -a install + # Clean everything RUN rm -rf /tmp/whl /root/.cache/pip /var/cache/apt/archives /var/lib/apt/lists/*