Enabling New Relic agent to be wired when docker container starts if an environment variable

is set.
This commit is contained in:
Josh Bonczkowski 2025-12-29 12:18:41 -05:00
parent 6247823ac2
commit 129d2ba505
2 changed files with 3 additions and 1 deletions

View file

@ -9,6 +9,8 @@ fi
if [ "$USE_DDTRACE" = "true" ]; then
export DD_TRACE_OPENAI_ENABLED="False"
exec ddtrace-run litellm "$@"
elif [ "$USE_NEWRELIC" = "true" ]; then
exec newrelic-admin run-python litellm "$@"
else
exec litellm "$@"
fi

View file

@ -8,7 +8,7 @@ pidfile=/tmp/supervisord.pid
programs=main,health
[program:main]
command=sh -c 'if [ "$USE_DDTRACE" = "true" ]; then export DD_TRACE_OPENAI_ENABLED="False"; exec ddtrace-run python -m litellm.proxy.proxy_cli --host 0.0.0.0 --port=4000 $LITELLM_ARGS; else exec python -m litellm.proxy.proxy_cli --host 0.0.0.0 --port=4000 $LITELLM_ARGS; fi'
command=sh -c 'if [ "$USE_DDTRACE" = "true" ]; then export DD_TRACE_OPENAI_ENABLED="False"; exec ddtrace-run python -m litellm.proxy.proxy_cli --host 0.0.0.0 --port=4000 $LITELLM_ARGS; elif [ "$USE_NEWRELIC" = "true" ]; then exec newrelic-admin run-program python -m litellm.proxy.proxy_cli --host 0.0.0.0 --port=4000 $LITELLM_ARGS; else exec python -m litellm.proxy.proxy_cli --host 0.0.0.0 --port=4000 $LITELLM_ARGS; fi'
autostart=true
autorestart=true
startretries=3