A starter for setting up Observability with Rust using prometheus, and grafana
you'll need to install:
there are also some os-specific requirements.
cargo install -f cargo-binutils
rustup component add llvm-tools-preview
# ubuntu
sudo apt-get install lld clang
# arch
sudo pacman -S lld clang
brew install michaeleisel/zld/zld
launch cargo
:
cargo build
launch cargo
:
cargo test
to run the application, prometheus, and grafana for observability, use docker-compose
:
docker-compose up --build
this will:
- start the app on
localhost:8000
- prometheus on
localhost:9090
- grafana on
localhost:3000
(username: 'admin' password:secret
)
the app uses actix-web-prom to expose prometheus metrics at /metrics
.
the app provides a health check endpoint at /health_check
.
to build, test, and run the project or use git commands, execute make <target>
in your terminal. for example, make build
to build the project or make git-status
to check git status.