||3 months ago|
|examples||3 months ago|
|src||3 months ago|
|.gitignore||3 months ago|
|Cargo.toml||3 months ago|
|LICENCE.Apache2||3 months ago|
|LICENCE.MIT||3 months ago|
|README.md||3 months ago|
metrics-process-promstyle: Prometheus-style process metrics for the
Although these metrics use the conventional Prometheus names, they can be used with any
Process metrics are the following useful statistics:
- CPU time
- memory usage
- start time of the process
- number of threads
Unimplemented process metrics:
Once your metrics exporter is set up, you can describe the process metrics using
metrics crate only provides for 'push'-style metrics; there's no way right now to emit statistics on demand.
For that reason, this crate exposes a function called
emit_now() which, as the name implies, emits the statistics when called.
You'll need to call this occasionally (from a background thread or Tokio task etc, if necessary) to update the metrics.
(One day, it should be as easy as enabling a feature in this crate and calling the necessary function to set up a timer for you.)
examples directory for an example.
For simplicity's sake, this crate will follow the major version number of
metrics, so it's easy to tell that compatible versions are being used.
This means that version
0.18.x of this crate will be compatible with
0.18.x, and a hypothetical version
1.x.x of this crate will be compatible with
If you feel like you want to make a contribution, I would be very happy to accept.
Licensed under either of
- Apache Licence, Version 2.0 (LICENSE.Apache2 or http://www.apache.org/licenses/LICENSE-2.0)
- MIT Licence (LICENSE.MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 licence, shall be dual licensed as above, without any additional terms or conditions.