diff --git a/README.md b/README.md index 23e127d..c854b32 100644 --- a/README.md +++ b/README.md @@ -187,10 +187,13 @@ tokio::spawn(do_work()); If you also enable the `metrics-rs-integration` feature, you can use [metrics.rs] exporters to export metrics outside of your process. `metrics.rs` supports a variety of exporters, including [Prometheus]. -The exported metrics by default will be exported with their name, preceded by `tokio_`. For example, `tokio_workers_count` for the [`workers_count`] metric. This can be customized by using the `with_metrics_tranformer` function. +The exported metrics by default will be exported with their name, preceded by `tokio_`. For example, `tokio_workers_count` for the [`workers_count`] metric. This can be customized by using the [`with_metrics_tranformer`] function. If you want to use [Prometheus], you could have this `Cargo.toml`: +[Prometheus]: https://prometheus.io +[`with_metrics_tranformer`]: https://docs.rs/tokio-metrics/0.4.*/tokio_metrics/struct.RuntimeMetricsReporterBuilder.html#method.with_metrics_transformer + ```toml [dependencies] tokio-metrics = { version = "0.4.1", features = ["metrics-rs-integration"] } diff --git a/src/lib.rs b/src/lib.rs index 3bf4ec7..549ac74 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -110,7 +110,7 @@ If the `metrics-rs-integration` feature is additionally enabled, this crate allo publishing runtime metrics externally via [metrics-rs](metrics) exporters. For example, you can use [metrics_exporter_prometheus] to make metrics visible -to Prometheus. You can see the [metrics_exporter_prometheus] and [metrics-rs](metrics) +to [Prometheus]. You can see the [metrics_exporter_prometheus] and [metrics-rs](metrics) docs for guidance on configuring exporters. The published metrics are the same as the fields of [RuntimeMetrics], but with @@ -118,8 +118,9 @@ a "tokio_" prefix added, for example `tokio_workers_count`. [metrics_exporter_prometheus]: https://docs.rs/metrics_exporter_prometheus [RuntimeMetrics]: crate::RuntimeMetrics +[Prometheus]: https://prometheus.io -This example exports Prometheus metrics by listening on a local Unix socket +This example exports [Prometheus] metrics by listening on a local Unix socket called `prometheus.sock`, which you can access for debugging by `curl --unix-socket prometheus.sock localhost`.