mirror of https://github.com/fralalonde/dipstick
Renamed project, README todo
This commit is contained in:
parent
13872b9bc5
commit
8ff8446d50
|
@ -1,5 +1,5 @@
|
|||
[root]
|
||||
name = "bladergator"
|
||||
name = "dipstick"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "bladergator"
|
||||
name = "dipstick"
|
||||
version = "0.1.0"
|
||||
authors = ["Francis Lalonde <francis.lalonde@adgear.com>"]
|
||||
authors = ["Francis Lalonde <fralalonde@gmail.com>"]
|
||||
|
||||
[dependencies]
|
||||
error-chain = "0.10"
|
||||
|
|
22
README.md
22
README.md
|
@ -1 +1,21 @@
|
|||
# bladergator
|
||||
dipstick
|
||||
--------
|
||||
Configurable metrics toolkit for Rust applications
|
||||
|
||||
```rust
|
||||
let channel_a = ProxyChannel::new( LogChannel::new() );
|
||||
let channel_b = ProxyChannel::new( StatsdChannel::new("localhost:8125", "hello.").unwrap() );
|
||||
let channel_x = DualChannel::new( channel_a, channel_b );
|
||||
let sugar_x = SugarChannel::new(channel_x);
|
||||
let counter = sugar_x.new_count("sugar_count_a");
|
||||
counter.value(1);
|
||||
```
|
||||
|
||||
##TODO
|
||||
- scopes
|
||||
- sampling
|
||||
- tags
|
||||
- tests
|
||||
- bench
|
||||
- doc
|
||||
- samples
|
|
@ -111,12 +111,12 @@ struct LogWrite {}
|
|||
impl MetricWrite<LogMetric> for LogWrite {
|
||||
fn write(&self, metric: &LogMetric, value: Value) {
|
||||
// TODO format faster
|
||||
println!("{} | Value {}", metric.prefix, value)
|
||||
println!("LOG {} | Value {}", metric.prefix, value)
|
||||
}
|
||||
|
||||
fn write_tag<S: AsRef<str>>(&self, metric: &LogMetric, value: Value, tags: Option<&[S]>) {
|
||||
// TODO format faster
|
||||
println!("{} | Value {}", metric.prefix, value)
|
||||
println!("LOG TAGS {} | Value {}", metric.prefix, value)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,13 +160,13 @@ struct StatsdWrite {}
|
|||
impl MetricWrite<StatsdMetric> for StatsdWrite {
|
||||
fn write(&self, metric: &StatsdMetric, value: Value) {
|
||||
// TODO send to UDP
|
||||
println!("Statsd {:?} {} {}", metric.m_type, metric.name, value)
|
||||
println!("STATSD {}:{}|{:?}", metric.name, value, metric.m_type)
|
||||
}
|
||||
|
||||
fn write_tag<S: AsRef<str>>(&self, metric: &StatsdMetric, value: Value, tags: Option<&[S]>) {
|
||||
// TODO send to UDP
|
||||
// TODO use tags
|
||||
println!("Statsd {:?} {} {}", metric.m_type, metric.name, value)
|
||||
println!("STATSD TAGS {}:{}|{:?}", metric.name, value, metric.m_type)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue