aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-02-24 14:59:49 +0100
committerAlex Auvolat <alex@adnab.me>2022-03-14 10:54:25 +0100
commit2377a92f6b64165be84f53722f30c21e9c8a0b3e (patch)
tree4a45feb7bd73bd541cc5f8552423cb9d46c8e26d /src/rpc
parent203e8d2c345dabee56e31aebf88b706df5aa72e5 (diff)
downloadgarage-2377a92f6b64165be84f53722f30c21e9c8a0b3e.tar.gz
garage-2377a92f6b64165be84f53722f30c21e9c8a0b3e.zip
Add wrapper over sled tree to count items (used for big queues)
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/rpc_helper.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rpc/rpc_helper.rs b/src/rpc/rpc_helper.rs
index 89225511..1b351024 100644
--- a/src/rpc/rpc_helper.rs
+++ b/src/rpc/rpc_helper.rs
@@ -134,7 +134,11 @@ impl RpcHelper {
M: Rpc<Response = Result<S, Error>>,
H: EndpointHandler<M>,
{
- let metric_tags = [KeyValue::new("rpc_endpoint", endpoint.path().to_string())];
+ let metric_tags = [
+ KeyValue::new("rpc_endpoint", endpoint.path().to_string()),
+ KeyValue::new("from", format!("{:?}", self.0.our_node_id)),
+ KeyValue::new("to", format!("{:?}", to)),
+ ];
let msg_size = rmp_to_vec_all_named(&msg)?.len() as u32;
let permit = self
@@ -245,6 +249,7 @@ impl RpcHelper {
)
};
let mut span = tracer.start(span_name);
+ span.set_attribute(KeyValue::new("from", format!("{:?}", self.0.our_node_id)));
span.set_attribute(KeyValue::new("to", format!("{:?}", to)));
span.set_attribute(KeyValue::new("quorum", quorum as i64));
span.set_attribute(KeyValue::new(