Minimal wrapper library for general metrics writing using telegraf. Telegraf is a micro service provided by InfluxData for making metrics reporting easy for multiple services - see their docs for more information.
Usage
Using this library assumes you have a socket listener input setup in your telegraf config, like so (currently only tcp is supported, but udp and unix are planned):
[[inputs.socket_listener]]
service_address = "tcp://localhost:8094"
Example usage:
use ;
let c = new.unwrap;
let p = new;
c.write_point
The second value in the field tuples can be any type that implements the protocol::IntoFieldData
trait provided by this lib. Out of the box support is provided for String
, &str
, f32
, and i32
. You can always implement this trait on your own custom types or types I forgot!