refactor: swap existing metrics for THE NEW WAY
parent
cd7df48718
commit
59282bce6e
|
@ -1,6 +1,7 @@
|
||||||
use crate::commands::run::{Config, ObjectStore as ObjStoreOpt};
|
use crate::commands::run::{Config, ObjectStore as ObjStoreOpt};
|
||||||
use futures::{future::FusedFuture, pin_mut, FutureExt};
|
use futures::{future::FusedFuture, pin_mut, FutureExt};
|
||||||
use hyper::server::conn::AddrIncoming;
|
use hyper::server::conn::AddrIncoming;
|
||||||
|
use metrics::MetricRegistry;
|
||||||
use object_store::{
|
use object_store::{
|
||||||
self, aws::AmazonS3, azure::MicrosoftAzure, gcp::GoogleCloudStorage, ObjectStore,
|
self, aws::AmazonS3, azure::MicrosoftAzure, gcp::GoogleCloudStorage, ObjectStore,
|
||||||
};
|
};
|
||||||
|
|
|
@ -423,6 +423,9 @@ where
|
||||||
let path = req.uri().path().to_string();
|
let path = req.uri().path().to_string();
|
||||||
let server = Arc::clone(&req.data::<Arc<AppServer<M>>>().expect("server state"));
|
let server = Arc::clone(&req.data::<Arc<AppServer<M>>>().expect("server state"));
|
||||||
|
|
||||||
|
// TODO - metrics. Implement a macro/something that will catch all the
|
||||||
|
// early returns.
|
||||||
|
|
||||||
// TODO(edd): figure out best way of catching all errors in this observation.
|
// TODO(edd): figure out best way of catching all errors in this observation.
|
||||||
let obs = server.metrics.http_requests.observation(); // instrument request
|
let obs = server.metrics.http_requests.observation(); // instrument request
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue