This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All request will be intercepted and metrics and log injected | |
fn call(&mut self, mut req: hyper::Request<Body>) -> Self::Future { | |
// This is necessary because tonic internally uses `tower::buffer::Buffer`. | |
// See https://github.com/tower-rs/tower/issues/547#issuecomment-767629149 | |
// for details on why this is necessary | |
let now = Instant::now(); | |
let clone = self.inner.clone(); | |
let mut inner = std::mem::replace(&mut self.inner, clone); | |
let (operation_name, metric_label) = operation_name_and_label_from_uri(req.uri()); | |
req.headers_mut() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am kurojishi on github. | |
* I am kurojishi (https://keybase.io/kurojishi) on keybase. | |
* I have a public key ASC_f1cbjdGRhfY9ScsSgW2yOifrJses0LTD8_VBCUyp-Qo | |
To claim this, I am signing this object: |