-
Notifications
You must be signed in to change notification settings - Fork 24
refactor: create metrics middleware #502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: create metrics middleware #502
Conversation
ae8e1f3 to
cd8d333
Compare
Pull Request Test Coverage Report for Build 11943090298Details
💛 - Coveralls |
cd8d333 to
cd38590
Compare
cd38590 to
df9cd5c
Compare
Signed-off-by: Gustavo Inacio <[email protected]>
27ccd1d to
a3dce07
Compare
anirudh2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of interesting changes! Nice work! A lot of my requests are just for documenting public functions
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
a3dce07 to
d9610c8
Compare
d9610c8 to
1e6ad79
Compare
Signed-off-by: Gustavo Inacio <[email protected]>
1e6ad79 to
73bfe0d
Compare
anirudh2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few small things left
| use tower::ServiceExt; | ||
|
|
||
| #[tokio::test] | ||
| async fn test_receipt_middleware() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reiterating this request! Just with all extensions empty.
Signed-off-by: Gustavo Inacio <[email protected]>
Signed-off-by: Gustavo Inacio <[email protected]>
anirudh2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Gustavo!
| ) -> Receiver<HashMap<DeploymentId, Address>> { | ||
| map_watcher(indexer_allocations_rx, move |allocation| { | ||
| allocation | ||
| .iter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use into_iter() here to get rid of deref in *address?
| let allocation = receipt.message.allocation_id; | ||
| request.extensions_mut().insert(Allocation(allocation)); | ||
| } else if let Some(deployment_id) = request.extensions().get::<DeploymentId>() { | ||
| if let Some(allocation) = my_state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoudnt it log when allocation is not found, or either the same for SignedReceiptorDeploymentId`?, for example
// adding this to the end of the ifs
else {
tracing::warn!("No allocation found for deployment: {:?}", deployment_id);
}
} else {
tracing::warn!("Neither SignedReceipt nor DeploymentId was found in request extensions.");
}
Signed-off-by: Gustavo Inacio [email protected]