diff --git a/api.py b/api.py
index 90de5dc32c6de7b3b6a70e75d05ae0e1e4983490..9fac4909b8bd270acc5571e88f680045d503e86c 100644
--- a/api.py
+++ b/api.py
@@ -116,8 +116,8 @@ def dispatcher(router, request, response):
         response.headers['Content-Type'] = 'application/json; charset=utf-8'
 
 try:
-    from newrelic import agent
-    app = agent.WSGIApplicationWrapper(webapp2.WSGIApplication(routes))
+    import newrelic.agent
+    app = newrelic.agent.WSGIApplicationWrapper(webapp2.WSGIApplication(routes))
 except ImportError:
     app = webapp2.WSGIApplication(routes)