This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description

Owl

Measure how long your Falcon requests take and send each measurement as an event to Riemann.

Example

Owl is designed to be a mix-in class for API. To use Owl you create your own API class providing configuration parameters for Owl.

In Python 3 this could look something like this:

from falcon.api import API
from riemann_client.client import QueuedClient
from owl import Owl

class MonitoredAPI(Owl, API):

    def __init__(self, *args, **kwds):
        kwds["get_riemann_client"] = lambda: QueuedClient()
        kwds["owl_service"] = "MyAPI"  # service name for Riemann
        super().__init__(*args, **kwds)

api = MonitoredAPI()
# api.add_route(...)
# ...

In Riemann you get the end point and the request result status code as tags. To convert them into their own InfluxDB tags ( endpoint` and ``status-code) for later use (for example in Grafana) you could do something like this in your Riemann InfluxDB configuration:

(defn- parse-api-event
 [event]
 (if (contains? event :tags)
   (let [[endpoint status-code & other] (:tags event)]
     (assoc event
       :endpoint endpoint
       :status-code status-code))
   event))

(let [index (index)]
 (streams index
   ; Write API monitoring to database
   (where (service "MyAPI")
     #(info (parse-api-event %))
     (comp api-db parse-api-event))))

Check out the event_builder parameter if you want to customize the event parameters (change what service means or add a description for example).

Installation

$ pip install owl

Changelog

0.2.0

  • generate a message with status 500 when a request throws an exception
Release History

Release History

0.2.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Owl-0.2.1-py2.py3-none-any.whl (8.3 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel May 24, 2016
Owl-0.2.1.tar.gz (6.0 kB) Copy SHA256 Checksum SHA256 Source May 24, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting