From 51588514f9eee1d254a0baf4aac7435cc5597fe9 Mon Sep 17 00:00:00 2001 From: Lubos Mjachky Date: Wed, 30 Oct 2024 14:55:27 +0100 Subject: [PATCH] Remove Opentelemetry instrumentation agent from the runtime We decided to instrument our application code manually by leveraging a customized middleware implemented in pulpcore. Refer to https://github.com/pulp/pulpcore/issues/5943 for more. --- docs/admin/guides/deploy-multi-process-images.md | 2 -- .../admin/reference/available-images/multi-process-images.md | 2 -- images/pulp_ci_centos/Containerfile | 2 -- images/s6_assets/init/pulpcore-api | 5 +---- images/s6_assets/init/pulpcore-content | 5 +---- images/s6_assets/init/pulpcore-worker | 5 +---- images/s6_assets/s6-rc.d/pulpcore-api/run | 1 - images/s6_assets/s6-rc.d/pulpcore-content/run | 1 - images/s6_assets/s6-rc.d/pulpcore-worker@1/run | 1 - 9 files changed, 3 insertions(+), 21 deletions(-) diff --git a/docs/admin/guides/deploy-multi-process-images.md b/docs/admin/guides/deploy-multi-process-images.md index 2f5ea662..10d8bdae 100644 --- a/docs/admin/guides/deploy-multi-process-images.md +++ b/docs/admin/guides/deploy-multi-process-images.md @@ -236,8 +236,6 @@ The following environment variables configure the container's behavior. * `PULP_GUNICORN_TIMEOUT` A positive integer that specifies the [timeout for gunicorn process](https://docs.gunicorn.org/en/stable/settings.html#timeout). Default to 90. -* `PULP_OTEL_ENABLED` Set to "true" (all lowercase) if you wish to enable pulp telemetry. - To add one of them, modify the command you use to start pulp to include syntax like the following at the beginning: Instead of `podman run`, specify `podman run -e PULP_WORKERS=4 -e PULP_GUNICORN_TIMEOUT=30 ...` ### Adding Signing Services diff --git a/docs/admin/reference/available-images/multi-process-images.md b/docs/admin/reference/available-images/multi-process-images.md index d0abd0d2..b343c441 100644 --- a/docs/admin/reference/available-images/multi-process-images.md +++ b/docs/admin/reference/available-images/multi-process-images.md @@ -236,8 +236,6 @@ The following environment variables configure the container's behavior. * `PULP_GUNICORN_TIMEOUT` A positive integer that specifies the [timeout for gunicorn process](https://docs.gunicorn.org/en/stable/settings.html#timeout). Default to 90. -* `PULP_OTEL_ENABLED` Set to "true" (all lowercase) if you wish to enable pulp telemetry. - * `PULP_API_WORKERS_MAX_REQUESTS` The maximum number of requests a worker will process before restarting API workers. If this is set to zero (the default) then the automatic worker restarts are disabled. NOTE: Only supported for pulpcore >= 3.41.0 * `PULP_API_WORKERS_MAX_REQUESTS_JITTER` The maximum jitter to add to the max_requests setting for API workers. NOTE: Only supported for pulpcore >= 3.41.0 diff --git a/images/pulp_ci_centos/Containerfile b/images/pulp_ci_centos/Containerfile index 559ad3fb..69c1b9d3 100644 --- a/images/pulp_ci_centos/Containerfile +++ b/images/pulp_ci_centos/Containerfile @@ -9,8 +9,6 @@ RUN curl -Ls https://github.com/just-containers/s6-overlay/releases/download/v3. ENV PULP_GUNICORN_RELOAD=${PULP_GUNICORN_RELOAD:-false} -ENV PULP_OTEL_ENABLED=${PULP_OTEL_ENABLED:-false} - ENV PULP_WORKERS=2 ENV PULP_HTTPS=false diff --git a/images/s6_assets/init/pulpcore-api b/images/s6_assets/init/pulpcore-api index 924c32a3..9f4a868b 100755 --- a/images/s6_assets/init/pulpcore-api +++ b/images/s6_assets/init/pulpcore-api @@ -2,9 +2,6 @@ if [ "${PULP_GUNICORN_RELOAD}" = "true" ]; then PULP_GUNICORN_RELOAD_STRING="--reload" fi -if [ "${PULP_OTEL_ENABLED}" = "true" ]; then - OTEL_PREFIX="/usr/local/bin/opentelemetry-instrument --service_name pulp-api" -fi if which pulpcore-api then @@ -32,7 +29,7 @@ then PULP_GUNICORN_PROCESS_RECYCLING_STRING="--max-requests ${PULP_API_WORKERS_MAX_REQUESTS} --max-requests-jitter ${PULP_API_WORKERS_MAX_REQUESTS_JITTER}" fi -exec ${OTEL_PREFIX} "${PULP_API_ENTRYPOINT[@]}" \ +exec "${PULP_API_ENTRYPOINT[@]}" \ --timeout "${PULP_GUNICORN_TIMEOUT}" \ --workers "${PULP_API_WORKERS}" \ ${PULP_GUNICORN_PROCESS_RECYCLING_STRING} \ diff --git a/images/s6_assets/init/pulpcore-content b/images/s6_assets/init/pulpcore-content index 27364170..6bbc90a3 100755 --- a/images/s6_assets/init/pulpcore-content +++ b/images/s6_assets/init/pulpcore-content @@ -2,9 +2,6 @@ if [ "${PULP_GUNICORN_RELOAD}" = "true" ]; then PULP_GUNICORN_RELOAD_STRING="--reload" fi -if [ "${PULP_OTEL_ENABLED}" = "true" ]; then - OTEL_PREFIX="/usr/local/bin/opentelemetry-instrument --service_name pulp-content" -fi if which pulpcore-content then @@ -32,7 +29,7 @@ then PULP_GUNICORN_PROCESS_RECYCLING_STRING="--max-requests ${PULP_CONTENT_WORKERS_MAX_REQUESTS} --max-requests-jitter ${PULP_CONTENT_WORKERS_MAX_REQUESTS_JITTER}" fi -exec ${OTEL_PREFIX} "${PULP_CONTENT_ENTRYPOINT[@]}" \ +exec "${PULP_CONTENT_ENTRYPOINT[@]}" \ --timeout "${PULP_GUNICORN_TIMEOUT}" \ --workers "${PULP_CONTENT_WORKERS}" \ ${PULP_GUNICORN_PROCESS_RECYCLING_STRING} \ diff --git a/images/s6_assets/init/pulpcore-worker b/images/s6_assets/init/pulpcore-worker index 165c11c7..d0321e1b 100755 --- a/images/s6_assets/init/pulpcore-worker +++ b/images/s6_assets/init/pulpcore-worker @@ -1,5 +1,2 @@ #!/bin/bash -if [ "${PULP_OTEL_ENABLED}" = "true" ]; then - OTEL_PREFIX="/usr/local/bin/opentelemetry-instrument --service_name pulp-worker" -fi -exec $OTEL_PREFIX /usr/local/bin/pulpcore-worker +exec /usr/local/bin/pulpcore-worker diff --git a/images/s6_assets/s6-rc.d/pulpcore-api/run b/images/s6_assets/s6-rc.d/pulpcore-api/run index fcc79934..c3b66291 100755 --- a/images/s6_assets/s6-rc.d/pulpcore-api/run +++ b/images/s6_assets/s6-rc.d/pulpcore-api/run @@ -14,7 +14,6 @@ importas HOME HOME importas PULP_GUNICORN_TIMEOUT PULP_GUNICORN_TIMEOUT importas PULP_API_WORKERS PULP_API_WORKERS importas PULP_GUNICORN_RELOAD PULP_GUNICORN_RELOAD -importas PULP_OTEL_ENABLED PULP_OTEL_ENABLED importas PULP_API_WORKERS_MAX_REQUESTS PULP_API_WORKERS_MAX_REQUESTS importas PULP_API_WORKERS_MAX_REQUESTS_JITTER PULP_API_WORKERS_MAX_REQUESTS_JITTER foreground { s6-echo "Calling /etc/init/pulpcore-api" } diff --git a/images/s6_assets/s6-rc.d/pulpcore-content/run b/images/s6_assets/s6-rc.d/pulpcore-content/run index ad1a01bc..dead4742 100755 --- a/images/s6_assets/s6-rc.d/pulpcore-content/run +++ b/images/s6_assets/s6-rc.d/pulpcore-content/run @@ -14,7 +14,6 @@ importas HOME HOME importas PULP_GUNICORN_TIMEOUT PULP_GUNICORN_TIMEOUT importas PULP_CONTENT_WORKERS PULP_CONTENT_WORKERS importas PULP_GUNICORN_RELOAD PULP_GUNICORN_RELOAD -importas PULP_OTEL_ENABLED PULP_OTEL_ENABLED importas PULP_CONTENT_WORKERS_MAX_REQUESTS PULP_CONTENT_WORKERS_MAX_REQUESTS importas PULP_CONTENT_WORKERS_MAX_REQUESTS_JITTER PULP_CONTENT_WORKERS_MAX_REQUESTS_JITTER foreground { s6-echo "Calling /etc/init/pulpcore-content" } diff --git a/images/s6_assets/s6-rc.d/pulpcore-worker@1/run b/images/s6_assets/s6-rc.d/pulpcore-worker@1/run index 32cb9ab9..99312d98 100755 --- a/images/s6_assets/s6-rc.d/pulpcore-worker@1/run +++ b/images/s6_assets/s6-rc.d/pulpcore-worker@1/run @@ -14,6 +14,5 @@ export HOME /var/lib/pulp/ importas HOME HOME export PATH /usr/local/bin:/usr/bin/ importas PATH PATH -importas PULP_OTEL_ENABLED PULP_OTEL_ENABLED foreground { s6-echo "Calling /etc/init/pulpcore-worker" } /etc/init/pulpcore-worker