Fix metric ordering (#1043)

pull/1061/head
Mattie Conover 2 years ago committed by GitHub
parent c37aa61b91
commit 3f8557d426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      rust/ethers-prometheus/src/json_rpc_client.rs

@ -154,6 +154,9 @@ where
"chain" => self.config.chain_name(),
"method" => method
};
if let Some(counter) = &self.metrics.request_count {
counter.with(&labels).inc()
}
let start = Instant::now();
let res = self.inner.request(method, params).await;
if let Some(counter) = &self.metrics.request_failure_count {
@ -161,9 +164,6 @@ where
counter.with(&labels).inc()
}
}
if let Some(counter) = &self.metrics.request_count {
counter.with(&labels).inc()
}
if let Some(counter) = &self.metrics.request_duration_seconds {
counter
.with(&labels)

Loading…
Cancel
Save