This shows how you can instrument Axum HTTP handler functions with autometrics.
For a more complete example also using axum, see the full API example.
Note: You will need prometheus installed locally for the full experience.
cargo run -p example-axum
This will start the server, generate some fake traffic, and run a local Prometheus instance that is configured to scrape the metrics from the server's /metrics
endpoint.