Skip to content

Latest commit

 

History

History
59 lines (35 loc) · 1.72 KB

README.md

File metadata and controls

59 lines (35 loc) · 1.72 KB

Sample Rust Axum app with Autometrics

This is a sample backend service written in Rust with Axum framework with several API handlers that are erroring or responding slowly intended to showcase the Autometrics framework with Service Level Objectives.

Resources

Getting started

To get the sample up and running you can follow these steps:

  1. Clone the repository
git clone autometrics-dev/gettingstarted-am-rs

cd gettingstarted-am-rs
  1. Download the Autometrics CLI

If you're on macOS you can use Homebrew:

brew install autometrics-dev/tap/am

or you can grab the binaries directly from the GitHub release.

  1. Start the application
cargo run

The application will start on a port 3000 by default and expose a metrics endpoint.

NOTE: You can override the listen address by exporting the LISTEN_ADDRESS environment variable. Note that you have to use this same address in the next step.

  1. Start the Autometrics CLI and Explorer

Start the Autometrics CLI and point it to the endpoint it can scrape metrics from.

am start :3000

Autometrics CLI will download and run a Prometheus binary under the hood and start scraping metrics.

  1. Preview the metrics in Autometrics Explorer

Autometrics CLI will also start a server with the Explorer available on localhost:6789. You can browse it and start exploring your sample app metrics! (You might need to ping the endpoints a few times to see the data reflected).

That's all!