Operations Observability
6 articles
How to Add Logging and Tracing to Rust Web Applications
Add the `tracing` and `tracing-subscriber` crates to your `Cargo.toml`, initialize the subscriber in `main`, and use the `#[instrument]` attribute on functions to automatically log entry, exit, and arguments.
How to Add Metrics to a Rust Application (prometheus, metrics crate)
Add the `metrics` crate to your `Cargo.toml`, initialize the recorder in `main`, and export metrics using the `metrics::counter!` macro.
How to Log to Files with Log Rotation in Rust
TITLE: How to Log to Files with Log Rotation in Rust
How to Set Up Continuous Deployment for Rust Applications
Configure GitHub Actions to automatically test, lint, and build your Rust application on every code change.
How to Use OpenTelemetry with Rust
Integrate OpenTelemetry with Rust by adding the axum-tracing-opentelemetry crate and applying its middleware to your Axum router.
How to Use Prometheus Metrics with Rust
Integrate Prometheus metrics into Rust Axum apps using the metrics crate and a dedicated middleware to track request latency and counts.