mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-27 00:00:24 +02:00
Update dependencies (#753)
This commit is contained in:
@@ -56,18 +56,14 @@ fn setup_metrics_recorder() -> PrometheusHandle {
|
||||
0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0,
|
||||
];
|
||||
|
||||
let recorder = PrometheusBuilder::new()
|
||||
PrometheusBuilder::new()
|
||||
.set_buckets_for_metric(
|
||||
Matcher::Full("http_requests_duration_seconds".to_string()),
|
||||
EXPONENTIAL_SECONDS,
|
||||
)
|
||||
.build();
|
||||
|
||||
let recorder_handle = recorder.handle();
|
||||
|
||||
metrics::set_boxed_recorder(Box::new(recorder)).unwrap();
|
||||
|
||||
recorder_handle
|
||||
.unwrap()
|
||||
.install_recorder()
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
async fn track_metrics<B>(req: Request<B>, next: Next<B>) -> impl IntoResponse {
|
||||
|
||||
Reference in New Issue
Block a user