Crate dipstick [−] [src]
A fast and modular metrics library decoupling app instrumentation from reporting backend. Similar to popular logging frameworks, but with counters and timers. Can be configured for combined outputs (log + statsd), random sampling, local aggregation of metrics, recurrent background publication, etc.
Reexports
pub use app::metrics; |
pub use fnsink::make_sink; |
pub use queue::queue; |
pub use cache::cache; |
pub use sampling::sample; |
pub use aggregate::aggregate; |
pub use publish::publish; |
pub use publish::publish_every; |
pub use output::log; |
pub use output::print; |
pub use statsd::statsd; |
Modules
| aggregate |
Maintain aggregated metrics for deferred reporting, |
| app |
This module regroups the application metrics front-end. |
| cache |
Cache defined metrics. |
| core |
Dipstick metrics core types and traits.
This is mostly centered around the backend.
Application-facing types are in the |
| fnsink |
A mechanism to dynamically define new sink implementations. |
| macros |
Publicly exposed metric macros are defined here.
Although |
| multi |
Dispatch metrics to multiple sinks. |
| output |
Standard stateless metric outputs. |
| publish |
Publishes metrics values from a source to a sink. |
| queue |
Queue metrics for write on a separate thread, Metrics definitions are still synchronous. If queue size is exceeded, calling code reverts to blocking. |
| sampling |
Reduce the amount of data to process or transfer by statistically dropping some of it. |
| statsd |
Send metrics to a statsd server. |
Macros
| time |
A convenience macro to wrap a block or an expression with a start / stop timer. Elapsed time is sent to the supplied statsd client after the computation has been performed. Expression result (if any) is transparently returned. |