CloudServices/Sagrada/Metlog: Difference between revisions

Line 42: Line 42:
* [http://opentsdb.net/ OpenTSDB] '''(Phase 3?)''' A "Time Series Database" providing fine grained real time monitoring and graphing.
* [http://opentsdb.net/ OpenTSDB] '''(Phase 3?)''' A "Time Series Database" providing fine grained real time monitoring and graphing.


== Proposed API ==
== API ==


The atomic unit for the Services Metrics system is the "message".  The structure of a message is inspired by that of the well known syslog message standard, with some slight extensions to allow for more rich metadata.  Each message will consist of the following fields:
The atomic unit for the Services Metrics system is the "message".  The structure of a message is inspired by that of the well known syslog message standard, with some slight extensions to allow for more rich metadata.  Each message will consist of the following fields:
Line 54: Line 54:
* ''env_version'': API version number of the "message envelope", i.e. any changes to the message data structure (exclusive of message-type-specific changes that may be embedded within the fields or the payload) must increment the env_version value.  The structure described in this document is envelope version 0.8.
* ''env_version'': API version number of the "message envelope", i.e. any changes to the message data structure (exclusive of message-type-specific changes that may be embedded within the fields or the payload) must increment the env_version value.  The structure described in this document is envelope version 0.8.


We will provide a "metlog" library that will both ease generation of these messages and that will handle packaging them up and delivering them into the message processing infrastructure.  Implementations of this library will likely be available in both Python and Javascript, but the Python library will be available first and this document will, for now, only describe the Python API. The Javascript API will be similar, modulo syntactic sugar that is available in Python but not in JS (e.g. decorators, context managers), and will be documented in detail in the future.  The proposed Python API is as follows:
We will provide "metlog" libraries that will both ease generation of these messages and that will handle packaging them up and delivering them into the message processing infrastructure.  Implementations of this library are be available in both Python and Node.js-style Javascript.  The Python API is as follows:


; '''MetlogClient(sender, logger="", severity=6)''' : Primary metlog client class which can accept metlog messages, format and serialize them, and pass them along for delivery to the message processor.
; '''MetlogClient(sender, logger="", severity=6)''' : Primary metlog client class which can accept metlog messages, format and serialize them, and pass them along for delivery to the message processor.
Confirmed users
125

edits