Crates.io | vapor |
lib.rs | vapor |
version | 0.2.0 |
source | src |
created_at | 2018-07-15 20:04:06.687282 |
updated_at | 2018-08-19 19:28:18.544313 |
description | A client library for vapord |
homepage | https://github.com/longshorej/rust-tags |
repository | https://github.com/appalachian-io/vapor-rust |
max_upload_size | |
id | 74380 |
size | 16,240 |
A client library for Rust applications to post metrics to vapord.
In Cargo.toml
:
vapor = "<latest-version>"
// Setup
let vapor = Vapor::new("localhost", 13542);
// Gauges
vapor.gauge("test", 5);
// Events
vapor.event("audiod-recv.%h.audio-buffer-underrun");
// Sampled Gauges (0.1% of the time)
vapor.sample_gauge("audiod-recv.%h.audio-clock-diff", clock_diff, 0.001);
// Use `clone` to support multiple writers
{
let vapor = vapor.clone();
thread::spawn(move || {
vapor.event("test");
});
}
Cargo.toml
, commit and push upstreamgit tag v0.1.0 && git push upstream v0.1.0
git checkout v0.1.0 && cargo publish