Ejemplo n.º 1
0
def enable_apptrace(app):
    """ Utility function that enables apptrace middleware. """

    from apptrace import middleware
    middleware.Config.URL_PATTERNS = ['^/$']
    app.wsgi_app = middleware.apptrace_middleware(app.wsgi_app)
    return app
Ejemplo n.º 2
0
def enable_apptrace(app):

    """ Utility function that enables apptrace middleware. """

    from apptrace import middleware
    middleware.Config.URL_PATTERNS = ['^/$']
    app.app = middleware.apptrace_middleware(app.app)
    return app
Ejemplo n.º 3
0
def enable_apptrace(app):

    ''' Utility function that enables apptrace middleware. '''

    try:
        from apptrace import middleware
        middleware.Config.URL_PATTERNS = ['^/$']
        app.app = middleware.apptrace_middleware(app.app)

    except Exception, e:
        logging.error('Failed to initialize AppTrace. Exception encountered: "' + str(e) + '".')
Ejemplo n.º 4
0
def webapp_add_wsgi_middleware(app):
    from apptrace.middleware import apptrace_middleware
    return apptrace_middleware(app)
Ejemplo n.º 5
0
def webapp_add_wsgi_middleware(app):
    from apptrace.middleware import apptrace_middleware
    return apptrace_middleware(app)