Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ENV \
NR_APP_NAME="" \
NR_LICENSE_KEY="" \
NR_VERSION="" \
NR_IGNORE_DEFAULT_EXCEPTION=false \
NR_IGNORED_EXECEPTIONS="" \
PHP_OPCACHE_ENABLED=false \
SESSION_HANDLER=false \
SESSION_HANDLER_NAME="" \
Expand Down
13 changes: 13 additions & 0 deletions bin/newrelic-setup
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ if [[ ${NR_ENABLED} == true ]]; then
echo "newrelic.application_logging.enabled = true" | tee -a /usr/local/etc/php/conf.d/newrelic.ini
fi

if [[ ${NR_IGNORE_DEFAULT_EXCEPTION} == true ]]; then
NR_DEFAULT_IGNORED_EXCEPTIONS="Simonetti\Infra\Exceptions\IgnorableExceptionInterface"
if [[ "${NR_IGNORED_EXECEPTIONS}" != "" ]]; then
NR_IGNORED_EXCEPTIONS="${NR_DEFAULT_IGNORED_EXCEPTIONS},${NR_IGNORED_EXECEPTIONS}"
else
NR_IGNORED_EXCEPTIONS="${NR_DEFAULT_IGNORED_EXCEPTIONS}"
fi
fi

if [[ "${NR_IGNORED_EXECEPTIONS}" != "" ]]; then
echo "newrelic.error_collector.ignore_exceptions = ${NR_IGNORED_EXECEPTIONS}" | tee -a /usr/local/etc/php/conf.d/newrelic.ini
fi

else
echo "newrelic.enabled = false" | tee -a /usr/local/etc/php/conf.d/newrelic.ini
fi