Skip to content

A hassle-free, single-responsibility, safe HTTP/S server used to easily expose metrics in your application.

License

Notifications You must be signed in to change notification settings

loshz/metrics_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metrics Server

CI Version Docs License

A hassle-free, single-responsibility, safe HTTP server used to easily expose metrics in your application.

Note: this library is NOT production ready! Use with caution and submit bugs where possible.

Usage

Include the lib in your Cargo.toml dependencies:

[dependencies]
metrics_server = "0.1"

In your application:

use metrics_server::MetricsServer;

// Create a new server and start it in the background.
let server = MetricsServer::new();
server.serve("localhost:8001");

// Publish you application metrics periodically.
let bytes = server.update(Vec::from([1, 2, 3, 4]));
assert_eq!(bytes, 4);

TOOD

  • Add integration tests.
  • Add Prometheus examples.

About

A hassle-free, single-responsibility, safe HTTP/S server used to easily expose metrics in your application.

Topics

Resources

License

Stars

Watchers

Forks

Languages