Function epimetheus::spawn_http_server
source · [−]pub fn spawn_http_server()
Expand description
Spawn a thread which serves metrics over HTTP.
By default the HTTP server runs on port 9898, but you can change this by
setting the RUST_METRICS_PORT
environment variable. Tip: If you want to
specify the metrics port in your application itself, you can do so like this:
std::env::set_var("RUST_METRICS_PORT", "1234");
epimetheus::spawn_http_server();