Testing Site Testing Site

skip to navigation
skip to content

whatap-python 0.0.1.dev238

Monitoring and Profiling Service

Latest Version: 0.0.1.dev306

WhaTap for python

Whatap allows for application performance monitoring. python version : 2.7이상 / WSGI server application.

Installation

$ pip install whatap-python

Configuration

  • Set configuration.

    $ export WHATAP_HOME=[application_path]
    $ whatap-config-license [xxx] # set license
    $ whatap-config-host [xxxx] # set host
    $ whatap-config-app-name [xxxx] # set application name
    $ whatap-config-app-process-name [xxxx] # set process middleware name(ex-uwsgi, gunicorn..)
    

Usage

  • Include the following imports at the top of every module.

    import whatap
    whatap.agent()
    
    ...
    
  • If you want WSGI Application monitoring, include the @register_app decorator.

    import whatap
    
    @whatap.register_app
    def simple_app(environ, start_response):
    """Simplest possible application object"""
        status = '200 OK'
        response_headers = [('Content-type', 'text/plain')]
        start_response(status, response_headers)
        return ['Hello world!\n']
    
  • If you want method profiling, include the @method_profiling decorator.

    from whatap import method_profiling
    
    @method_profiling
    def db_connection():
        db.connect('mysql:// ..')
    
    @method_profiling
    def query():
        db.select('select * from ..')
    
      ....
    

Restart

  • Your Application restart.
 
File Type Py Version Uploaded on Size
whatap-python-0.0.1.dev238.tar.gz (md5) Source 2017-09-14 5MB