import os
from django.core.wsgi import get_wsgi_application

import newrelic.agent
newrelic.agent.initialize('/var/www-data/censusreporter/conf/newrelic.ini')

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()

import os
from django.core.wsgi import get_wsgi_application

import newrelic.agent
newrelic.agent.initialize(os.path.join(os.path.abspath(os.path.dirname(__file__)), '../../../conf/newrelic.ini'))

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()

Correct location of newrelic config
Correct location of newrelic config

  import os
  from django.core.wsgi import get_wsgi_application
  
  import newrelic.agent
- newrelic.agent.initialize('/var/www-data/censusreporter/conf/newrelic.ini')
+ newrelic.agent.initialize(os.path.join(os.path.abspath(os.path.dirname(__file__)), '../../../conf/newrelic.ini'))
  
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
  application = get_wsgi_application()
  
Correct location of newrelic config
## Code Before:
import os
from django.core.wsgi import get_wsgi_application

import newrelic.agent
newrelic.agent.initialize('/var/www-data/censusreporter/conf/newrelic.ini')

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()

## Instruction:
Correct location of newrelic config
## Code After:
import os
from django.core.wsgi import get_wsgi_application

import newrelic.agent
newrelic.agent.initialize(os.path.join(os.path.abspath(os.path.dirname(__file__)), '../../../conf/newrelic.ini'))

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.prod.settings")
application = get_wsgi_application()
