From 0d8a000fe3c4efaf8cb10f1c15b082cf6da3da27 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Thu, 12 Oct 2023 14:18:01 +1100 Subject: [PATCH 1/2] add new relic variables --- helpers/TESTING_base_images_dockercompose.md | 3 +++ helpers/images-docker-compose.yml | 3 +++ images/php-fpm/8.0.Dockerfile | 3 +++ images/php-fpm/8.1.Dockerfile | 3 +++ images/php-fpm/8.2.Dockerfile | 3 +++ 5 files changed, 15 insertions(+) diff --git a/helpers/TESTING_base_images_dockercompose.md b/helpers/TESTING_base_images_dockercompose.md index 0ababbd46..7c932157c 100644 --- a/helpers/TESTING_base_images_dockercompose.md +++ b/helpers/TESTING_base_images_dockercompose.md @@ -87,6 +87,7 @@ docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep " docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep "xdebug.log" | grep "/tmp/xdebug.log" docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep "newrelic.appname" | grep "noproject-nobranch" docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep "newrelic.logfile" | grep "/dev/stderr" +docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep "newrelic.application_logging.metrics.enabled" | grep "disabled" docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep "Blackfire" | grep "enabled" docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep "blackfire.agent_socket" | grep "tcp://127.0.0.1:8307" @@ -128,6 +129,7 @@ docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep " docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "xdebug.log" | grep "/tmp/xdebug.log" docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "newrelic.appname" | grep "noproject-nobranch" docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "newrelic.logfile" | grep "/dev/stderr" +docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep "newrelic.application_logging.forwarding.enabled" | grep "disabled" docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "Blackfire" | grep "enabled" docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "blackfire.agent_socket" | grep "tcp://127.0.0.1:8307" @@ -168,6 +170,7 @@ docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep " docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "PHP_IDE_CONFIG" | grep "serverName=lagoon" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "xdebug.log" | grep "/tmp/xdebug.log" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "newrelic.appname" | grep "noproject-nobranch" +docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep "newrelic.application_logging.enabled" | grep "disabled" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "newrelic.logfile" | grep "/dev/stderr" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "Blackfire" | grep "enabled" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "blackfire.agent_socket" | grep "tcp://127.0.0.1:8307" diff --git a/helpers/images-docker-compose.yml b/helpers/images-docker-compose.yml index e82aba333..ce73cde08 100644 --- a/helpers/images-docker-compose.yml +++ b/helpers/images-docker-compose.yml @@ -53,6 +53,7 @@ services: - XDEBUG_LOG=true - NEWRELIC_ENABLED=true - BLACKFIRE_ENABLED=true + - NEWRELIC_APPLICATION_LOGGING_METRICS_ENABLED=false << : *default-user # uses the defined user from top command: ["sh", "-c", " echo PD9waHAKCnBocGluZm8oICk7Cgo/Pg== | base64 -d > /app/index.php; @@ -85,6 +86,7 @@ services: - XDEBUG_LOG=true - NEWRELIC_ENABLED=true - BLACKFIRE_ENABLED=true + - NEWRELIC_APPLICATION_LOGGING_FORWARDING_ENABLED=false << : *default-user # uses the defined user from top command: ["sh", "-c", " echo PD9waHAKCnBocGluZm8oICk7Cgo/Pg== | base64 -d > /app/index.php; @@ -117,6 +119,7 @@ services: - XDEBUG_LOG=true - NEWRELIC_ENABLED=true - BLACKFIRE_ENABLED=true + - NEWRELIC_APPLICATION_LOGGING_ENABLED=false << : *default-user # uses the defined user from top command: ["sh", "-c", " echo PD9waHAKCnBocGluZm8oICk7Cgo/Pg== | base64 -d > /app/index.php; diff --git a/images/php-fpm/8.0.Dockerfile b/images/php-fpm/8.0.Dockerfile index 57cba73a0..8f9e4ad2f 100644 --- a/images/php-fpm/8.0.Dockerfile +++ b/images/php-fpm/8.0.Dockerfile @@ -128,6 +128,9 @@ RUN architecture=$(case $(uname -m) in x86_64 | amd64) echo "amd64" ;; aarch64 | && sed -i -e "s/;newrelic.daemon.loglevel = .*/newrelic.daemon.loglevel = \"\${NEWRELIC_DAEMON_LOG_LEVEL:-warning}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ && sed -i -e "s/newrelic.logfile = .*/newrelic.logfile = \"\/dev\/stderr\"/" /usr/local/etc/php/conf.d/newrelic.ini \ && sed -i -e "s/newrelic.daemon.logfile = .*/newrelic.daemon.logfile = \"\/dev\/stderr\"/" /usr/local/etc/php/conf.d/newrelic.ini \ + && sed -i -e "s/;newrelic.application_logging.enabled = .*/newrelic.application_logging.enabled = \${NEWRELIC_APPLICATION_LOGGING_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ + && sed -i -e "s/;newrelic.application_logging.metrics.enabled = .*/newrelic.application_logging.metrics.enabled = \${NEWRELIC_APPLICATION_LOGGING_METRICS_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ + && sed -i -e "s/;newrelic.application_logging.forwarding.enabled = .*/newrelic.application_logging.forwarding.enabled = \${NEWRELIC_APPLICATION_LOGGING_FORWARDING_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ && mv /usr/local/etc/php/conf.d/newrelic.ini /usr/local/etc/php/conf.d/newrelic.disable \ && cd / && rm -rf /tmp/newrelic \ && fix-permissions /usr/local/etc/; \ diff --git a/images/php-fpm/8.1.Dockerfile b/images/php-fpm/8.1.Dockerfile index dd60b26a9..82fb84b74 100644 --- a/images/php-fpm/8.1.Dockerfile +++ b/images/php-fpm/8.1.Dockerfile @@ -127,6 +127,9 @@ RUN architecture=$(case $(uname -m) in x86_64 | amd64) echo "amd64" ;; aarch64 | && sed -i -e "s/;newrelic.daemon.loglevel = .*/newrelic.daemon.loglevel = \"\${NEWRELIC_DAEMON_LOG_LEVEL:-warning}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ && sed -i -e "s/newrelic.logfile = .*/newrelic.logfile = \"\/dev\/stderr\"/" /usr/local/etc/php/conf.d/newrelic.ini \ && sed -i -e "s/newrelic.daemon.logfile = .*/newrelic.daemon.logfile = \"\/dev\/stderr\"/" /usr/local/etc/php/conf.d/newrelic.ini \ + && sed -i -e "s/;newrelic.application_logging.enabled = .*/newrelic.application_logging.enabled = \${NEWRELIC_APPLICATION_LOGGING_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ + && sed -i -e "s/;newrelic.application_logging.metrics.enabled = .*/newrelic.application_logging.metrics.enabled = \${NEWRELIC_APPLICATION_LOGGING_METRICS_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ + && sed -i -e "s/;newrelic.application_logging.forwarding.enabled = .*/newrelic.application_logging.forwarding.enabled = \${NEWRELIC_APPLICATION_LOGGING_FORWARDING_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ && mv /usr/local/etc/php/conf.d/newrelic.ini /usr/local/etc/php/conf.d/newrelic.disable \ && cd / && rm -rf /tmp/newrelic \ && fix-permissions /usr/local/etc/; \ diff --git a/images/php-fpm/8.2.Dockerfile b/images/php-fpm/8.2.Dockerfile index c3c659959..5cde08f8c 100644 --- a/images/php-fpm/8.2.Dockerfile +++ b/images/php-fpm/8.2.Dockerfile @@ -127,6 +127,9 @@ RUN architecture=$(case $(uname -m) in x86_64 | amd64) echo "amd64" ;; aarch64 | && sed -i -e "s/;newrelic.daemon.loglevel = .*/newrelic.daemon.loglevel = \"\${NEWRELIC_DAEMON_LOG_LEVEL:-warning}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ && sed -i -e "s/newrelic.logfile = .*/newrelic.logfile = \"\/dev\/stderr\"/" /usr/local/etc/php/conf.d/newrelic.ini \ && sed -i -e "s/newrelic.daemon.logfile = .*/newrelic.daemon.logfile = \"\/dev\/stderr\"/" /usr/local/etc/php/conf.d/newrelic.ini \ + && sed -i -e "s/;newrelic.application_logging.enabled = .*/newrelic.application_logging.enabled = \${NEWRELIC_APPLICATION_LOGGING_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ + && sed -i -e "s/;newrelic.application_logging.metrics.enabled = .*/newrelic.application_logging.metrics.enabled = \${NEWRELIC_APPLICATION_LOGGING_METRICS_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ + && sed -i -e "s/;newrelic.application_logging.forwarding.enabled = .*/newrelic.application_logging.forwarding.enabled = \${NEWRELIC_APPLICATION_LOGGING_FORWARDING_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ && mv /usr/local/etc/php/conf.d/newrelic.ini /usr/local/etc/php/conf.d/newrelic.disable \ && cd / && rm -rf /tmp/newrelic \ && fix-permissions /usr/local/etc/; \ From a9a0212b460d3d4f9c8d8cd2250f37d2340b4e91 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Thu, 12 Oct 2023 14:57:14 +1100 Subject: [PATCH 2/2] fix NR tests --- helpers/TESTING_base_images_dockercompose.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/TESTING_base_images_dockercompose.md b/helpers/TESTING_base_images_dockercompose.md index 7c932157c..1c7bb3c3d 100644 --- a/helpers/TESTING_base_images_dockercompose.md +++ b/helpers/TESTING_base_images_dockercompose.md @@ -129,7 +129,7 @@ docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep " docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "xdebug.log" | grep "/tmp/xdebug.log" docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "newrelic.appname" | grep "noproject-nobranch" docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "newrelic.logfile" | grep "/dev/stderr" -docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep "newrelic.application_logging.forwarding.enabled" | grep "disabled" +docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "newrelic.application_logging.forwarding.enabled" | grep "disabled" docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "Blackfire" | grep "enabled" docker-compose exec -T commons sh -c "curl -kL http://php-8-1-dev:9000" | grep "blackfire.agent_socket" | grep "tcp://127.0.0.1:8307" @@ -170,7 +170,7 @@ docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep " docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "PHP_IDE_CONFIG" | grep "serverName=lagoon" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "xdebug.log" | grep "/tmp/xdebug.log" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "newrelic.appname" | grep "noproject-nobranch" -docker-compose exec -T commons sh -c "curl -kL http://php-8-0-dev:9000" | grep "newrelic.application_logging.enabled" | grep "disabled" +docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "newrelic.application_logging.enabled" | grep "disabled" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "newrelic.logfile" | grep "/dev/stderr" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "Blackfire" | grep "enabled" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-dev:9000" | grep "blackfire.agent_socket" | grep "tcp://127.0.0.1:8307"