Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

whatap-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whatap-python

Monitoring and Profiling Service

  • 1.7.2
  • PyPI
  • Socket score

Maintainers
1

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

.. _WhaTap: https://www.whatap.io/

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

.. code:: bash

$ pip install whatap-python

Application Monitoring

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

Configuration


  .. code:: bash

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

Usage
~~~~~

  .. code:: bash

    $ whatap-start-agent [YOUR_APPLICATION_START_COMMAND]

    ...

Unsupported web frameworks WSGI

If you want WSGI Application monitoring, include the @register_app decorator.

.. code:: python

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.

  .. code:: python

    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.

  .. code:: bash

    $ 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.

  .. code:: bash

    $ whatap-start-batch

Example code
~~~~~~~~~~~~

  .. code:: python

    from whatap import method_profiling

    class Command(BaseCommand):

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

Restart
-------

Your Application restart.

Copyright
---------

Copyright (c) 2017 Whatap, Inc. All rights reserved.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc