Skip to content

appalachian-io/vapor-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vapor-rust

Crates.io Crates.io

A client library for Rust applications to post metrics to vapord.

Setup

In Cargo.toml:

vapor = "<latest-version>"

Usage

// 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");
  });
}

Releasing

  1. Update version in Cargo.toml, commit and push upstream
  2. Create a tag and push it, e.g. : git tag v0.1.0 && git push upstream v0.1.0
  3. Checkout the tag and publish: git checkout v0.1.0 && cargo publish

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages