mirror of https://github.com/fralalonde/dipstick
Exposed attributes::MetricId
This commit is contained in:
parent
e7a00d9cf3
commit
a29991a938
|
@ -59,10 +59,12 @@ impl Default for Buffering {
|
|||
}
|
||||
}
|
||||
|
||||
/// A metrics identifier
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialOrd, PartialEq)]
|
||||
pub struct MetricId(String);
|
||||
|
||||
impl MetricId {
|
||||
/// Return a MetricId based on output type and metric name
|
||||
pub fn forge(out_type: &str, name: MetricName) -> Self {
|
||||
let id: String = name.join("/");
|
||||
MetricId(format!("{}:{}", out_type, id))
|
||||
|
|
|
@ -71,7 +71,8 @@ mod multi;
|
|||
mod queue;
|
||||
|
||||
pub use crate::attributes::{
|
||||
Buffered, Buffering, Observe, ObserveWhen, OnFlush, OnFlushCancel, Prefixed, Sampled, Sampling,
|
||||
Buffered, Buffering, MetricId, Observe, ObserveWhen, OnFlush, OnFlushCancel, Prefixed, Sampled,
|
||||
Sampling,
|
||||
};
|
||||
pub use crate::clock::TimeHandle;
|
||||
pub use crate::input::{
|
||||
|
|
Loading…
Reference in New Issue