Skip to main content

Monitoring and Profiling Service

Project description

https://www.whatap.io/img/common/whatap_logo_re.svg

WhaTap for python

  • Whatap allows for application performance monitoring.

  • Support: WSGI server application & Batch job & Specific method profiling.

  • Python version : 2.7 + & 3.3+

Installation

$ pip install whatap-python

Application Monitoring

Supported web frameworks such as Django, Flask, Bottle, Cherrypy, Tornado and WSGI Server Application.

Configuration

$ export WHATAP_HOME=[PATH]
$ whatap-setting-config --host [HOST_ADDR]
                        --license [LICENSE_KEY]
                        --app_name [APPLICATION_NAME]
                        --app_process_name [APP_PROCESS_NAME]

Usage

$ whatap-start-agent [YOUR_APPLICATION_START_COMMAND]

...

Unsupported web frameworks WSGI

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']

Method Profiling

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 ..')

  ....

Batch Monitoring

for Batch job.

Configuration

Set Environment valiable configuration.

$ export WHATAP_BATCH_HOME=[PATH]
$ cat >> $WHATAP_BATCH_HOME/whatap.conf << EOF
license=[LICENSE_KEY]
whatap.server.host=[HOST_ADDR]

app_name=batch
app_process_name=batch
EOF

Usage

Start bach agent.

$ whatap-start-batch

Example code

from whatap import method_profiling

class Command(BaseCommand):

    @batch_profiling
    def handle(self, *args, **options):
        // batch code..
        ....

Restart

Your Application restart.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whatap-python-0.1.72.tar.gz (10.5 MB view details)

Uploaded Source

File details

Details for the file whatap-python-0.1.72.tar.gz.

File metadata

  • Download URL: whatap-python-0.1.72.tar.gz
  • Upload date:
  • Size: 10.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.18.3 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.14.0 CPython/3.6.0

File hashes

Hashes for whatap-python-0.1.72.tar.gz
Algorithm Hash digest
SHA256 ca2a472e11010793202bd827242d31229ac79da5367a9bd389763b92702e5164
MD5 e0cc32503888825b78d6d4375fd3c25d
BLAKE2b-256 d4f9afc96c38a00b1536643b005c037acfaba81af83db34e0c5a46fdf1ef5392

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page