django - Do I need to edit the wsgi.py file to install the New Relic Agent using Gunicorn/Python? -
i have django project deployed through digitalocean. trying install new relic python agent , have followed of instructions, when edit wsgi.py, receive 502 error. website using django , unicorn, i'm not sure if should editing wsgi.py file? instructions quite confusing. have wsgi.py file in project directory, , works correctly.
import os os.environ.setdefault("django_settings_module", "project.settings") django.core.wsgi import get_wsgi_application application = get_wsgi_application()
now when change following (following new relic quick start), receive 502 error, , nothing in django/nginx/wsgi logs tells me why.
import os os.environ.setdefault("django_settings_module", "project.settings") import newrelic.agent newrelic.agent.initialize(os.path.join(os.path.dirname(os.path.dirname(__file__), 'newrelic.ini') django.core.wsgi import get_wsgi_application application = get_wsgi_application()
my guess i'm not supposed edit wsgi.py file. thing confuses me new relic has directions installing python agent both uwsgi , unicorn.
Comments
Post a Comment