ocean.util.log.Stats

Classes to write statistics to be used in graphite.

Applications that want to log statistics usually make use of the StatsExt extension (most likely by deriving from DaemonApp), which provides a StatsLog instance which is automatically configured from the application's config.ini.

StatsLog provides methods to: 1. Build up a stats line by writing sets of values (specified by the fields of one or more user-specified structs). 2. Flush the stats line to the output.

Currently, StatsLog writes to a file (called stats.log), which is then parsed by a script that will feed the data to a Collectd socket. Every server's Collectd daemon will then report to a master Collectd server which aggregates the data. As our number of stats is growing and the write rate is increasing, we're planning to expose a way to directly write to the Collectd socket. As a result, the current API of StatsLog is intentionally designed to comply to the limitations of Collectd. See the documentation of StatsLog for more details

Refer to the class' description for information about their actual usage.

Members

Classes

StatsLog
class StatsLog

Transmit the values of an aggregate to be used within graphite.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).