This project has been superceded by heka-py https://github.com/mozilla-services/heka-py and hekad https://github.com/mozilla-services/heka.
This repository is no longer being actively maintained.
metlog-py is a Python client for the “Metlog” system of application logging and metrics gathering developed by the Mozilla Services team. The Metlog system is meant to make life easier for application developers with regard to generating and sending logging and analytics data to various destinations. It achieves this goal (we hope!) by separating the concerns of message generation from those of message delivery and analysis. Front end application code no longer has to deal directly with separate back end client libraries, or even know what back end data storage and processing tools are in use. Instead, a message is labeled with a type (and possibly other metadata) and handed to the Metlog system, which then handles ultimate message delivery.
The Metlog system consists of three pieces:
The metlog-py library you are currently reading about is a client library meant to be used by Python-based generator applications. It provides a means for those apps to insert messages into the system for delivery to the router and, ultimately, one or more endpoints.
More information about how Mozilla Services is using Metlog (including what is being used for a router and what endpoints are in use / planning to be used) can be found on the relevant spec page.
There are two primary components to the metlog-py library, the MetlogClient client class which exposes the primary metlog client API, and the various Senders classes, one of which must be provided to the MetlogClient and which handles the actual delivery of the message to the router component.
The MetlogClient can be instantiated directly, but metlog-py also provides some utility functions that will parse config files and set up a configured client instance for you. Folks new to using Metlog will probably find Metlog Configuration a good place to get started.