具有Newrelic Python代理和Supervisord的Docker容器不发送数据

我在使用supervisord运行的uwsgi中有一个dockerised的Django应用程序,我试图使用Newrelic APM监视应用程序。 新的Relic Python代理程序安装命令是在Dockerfile和wsgi.py中编写的,包含下面的代码。

import newrelic.agent<br/> newrelic.agent.initialize('/opt/testapp/newrelic.ini') 

我的supervisord.conf文件:

 [program:newrelic]<br> command=newrelic-admin run-program uwsgi --thunder-lock --ini /opt/testapp/uwsgi.ini --protocol http<br> autostart=true<br> autorestart=true<br> redirect_stderr=true 

下面是我的Dockerfile命令来复制supervisord conf文件并运行supervisord

 COPY config/supervisord-newrelic.conf /etc/supervisor/conf.d/supervisord.conf <br> CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] 

运行docker-compose up命令后,应用程序开始运行,没有任何问题,应用程序名称在New Relic APM仪表板中列出,但未在我的newrelic APM仪表板中显示任何数据。