Crates.io | metrical |
lib.rs | metrical |
version | 0.1.1 |
source | src |
created_at | 2020-06-30 18:43:29.597341 |
updated_at | 2020-06-30 18:43:29.597341 |
description | Graphite/Statsd metrics client |
homepage | |
repository | https://github.com/austinJayIves/metrical |
max_upload_size | |
id | 259934 |
size | 49,686 |
Metrical makes it easy to add and track metrics from Rust services.
Metrical supports the three following protocols
Additionally, Metrical can send metrics via either UDP or TCP.
Metrical is fairly easy to get going. To configure Metrical, you
can either use the helper function metrical::from_env
, or
use create a configuration directly via a ConfigurationBuilder
and
invoke metrical::from_config
with the configuration.
After that, you can easily create a counter, gauge or timer with
metrical::counter
, metrical::gauge
and metrical::timer
respectively.
Feel free to email me at austin.jay.ives+metrical@gmail.com.
This project is licensed under the MIT open source license
To configure the library via environment variables the following environment variables are used:
METRICAL_NETWORK_PROTOCOL
- [UDP|TCP]METRICAL_NETWORK_DESTINATION
- (ip_address:port) or (ip_address)METRICAL_SEND_METHOD
- [StatsD|Graphite|Graphite_pickle]METRICAL_NAMESPACE
- A path to put all created metrics underneath. Of the form foo.myBar.baz
.METRICAL_FLUSH_INTERVAL
- An interval of time (in seconds) before flushing the metrics buffer.METRICAL_FLUSH_AMOUNT
- The maximum amount of records to store in the metrics buffer at any one time.Additionally, a prefix can be used with the environment variables. For example, if the prefix MY_PROJ
was used, the METRICAL_NETWORK_PROTOCOL
environment variable
will be looked up under MY_PROJ_METRICAL_NETWORK_PROTOCOL
.