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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -