Skip to content

Instantly share code, notes, and snippets.

@tylev
Last active August 29, 2015 13:57
Show Gist options
  • Save tylev/9646261 to your computer and use it in GitHub Desktop.
Save tylev/9646261 to your computer and use it in GitHub Desktop.
Web.py troubleshooting with newrelic
import _mysql
from os import system
from uuid import uuid4
from time import time as unix
from web import application as webapp
from web import header, ctx, data, input, notfound
import newrelic.agent
class enroll:
def GET(self):
action item here
class mdm:
def PUT(self):
do something here
def POST(self):
more action here
newrelic.agent.initialize('newrelic.ini')
sm = smobject()
urls = ('/enroll','enroll','/checkin','mdm','/server','mdm')
application = webapp(urls, globals()).wsgifunc()
application = newrelic.agent.WSGIApplicationWrapper(application)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment