Skip to content

Commit e457706

Browse files
committed
(improv): permitindo habilitar tracing e logging do newrelic
1 parent 8d23cfd commit e457706

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ FROM php:7.4-apache
44
ENV http_proxy ${HTTP_PROXY}
55
ENV https_proxy ${HTTP_PROXY}
66
ENV NR_ENABLED=false
7+
ENV NR_DISTRIBUTED_TRACING_ENABLED=false
8+
ENV NR_APPLICATION_LOGGING_ENABLED=false
79
ENV NR_APP_NAME=""
810
ENV NR_LICENSE_KEY=""
911
ENV NR_VERSION=""

bin/newrelic-setup

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ if [[ ${NR_ENABLED} == true ]]; then
44
sed -i -e "s/"REPLACE_WITH_REAL_KEY"/${NR_LICENSE_KEY}/g" /usr/local/etc/php/conf.d/newrelic.ini
55
sed -i -e "s/PHP Application/${NR_APP_NAME}/g" /usr/local/etc/php/conf.d/newrelic.ini
66
echo "newrelic.enabled = true" | tee -a /usr/local/etc/php/conf.d/newrelic.ini
7+
8+
if [[ ${NR_DISTRIBUTED_TRACING_ENABLED} == true ]]; then
9+
echo "newrelic.distributed_tracing_enabled = true" | tee -a /usr/local/etc/php/conf.d/newrelic.ini
10+
fi
11+
12+
if [[ ${NR_APPLICATION_LOGGING_ENABLED} == true ]]; then
13+
echo "newrelic.application_logging.enabled = true" | tee -a /usr/local/etc/php/conf.d/newrelic.ini
14+
fi
15+
716
else
817
echo "newrelic.enabled = false" | tee -a /usr/local/etc/php/conf.d/newrelic.ini
918
fi

0 commit comments

Comments
 (0)