Skip to content
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.

Commit

Permalink
add in new relic (bug 929215)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy McKay committed Oct 23, 2013
1 parent 62d1be8 commit 8991f26
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions manage.py
Expand Up @@ -19,5 +19,19 @@

manage.setup_environ(__file__, more_pythonic=True)

# Specifically importing once the environment has been setup.
from django.conf import settings
newrelic_ini = getattr(settings, 'NEWRELIC_INI', None)

if newrelic_ini:
import newrelic.agent
try:
newrelic.agent.initialize(newrelic_ini)
except newrelic.api.exceptions.ConfigurationError:
import logging
startup_logger = logging.getLogger('.startup')
startup_logger.exception('Failed to load new relic config.')


if __name__ == "__main__":
manage.main()
1 change: 1 addition & 0 deletions requirements/prod.txt
Expand Up @@ -28,6 +28,7 @@ m2secret==0.1.1
mock==1.0b1
mozilla-logger==0.1
mozpay==2.0.0
newrelic==2.4.0.4
nose==1.2.1
oauth2==1.5.211
ordereddict==1.1
Expand Down
3 changes: 3 additions & 0 deletions webpay/settings/base.py
Expand Up @@ -491,3 +491,6 @@
# Wait timeout (Default 60s).
'wait_timeout': 60000,
}

# New Relic is configured here.
NEWRELIC_INI = None

0 comments on commit 8991f26

Please sign in to comment.