fix(app): remove redundant Arc wrapper around PrometheusHandle
Actix-web's Data<T> extractor expects T to implement Clone, so PrometheusHandle (which is Clone) does not need to be wrapped in Arc. The Arc type mismatch caused /metrics to return 500.
This commit is contained in:
parent
90447ef98f
commit
91bebba45e
@ -86,8 +86,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
};
|
||||
|
||||
let prometheus_handle = install_recorder();
|
||||
let prometheus_handle_arc = std::sync::Arc::new(prometheus_handle);
|
||||
let prometheus_handle_data = web::Data::new(prometheus_handle_arc.clone());
|
||||
let prometheus_handle_data = web::Data::new(prometheus_handle.clone());
|
||||
|
||||
let http_metrics = std::sync::Arc::new(HttpMetrics::new());
|
||||
let http_snapshot: HttpSnapshotGuard = std::sync::Arc::new(std::sync::RwLock::new(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user