forked from Deuxfleurs/tricot
add small comment
This commit is contained in:
parent
60e8aacfd7
commit
b2ba666a11
1 changed files with 4 additions and 0 deletions
|
@ -197,6 +197,10 @@ async fn handle_request(
|
||||||
let tags = [host_tag, method_tag.clone()];
|
let tags = [host_tag, method_tag.clone()];
|
||||||
metrics.requests_received.add(1, &tags);
|
metrics.requests_received.add(1, &tags);
|
||||||
metrics.requests_in_flight.add(1, &tags);
|
metrics.requests_in_flight.add(1, &tags);
|
||||||
|
|
||||||
|
// The guard ensures that we decrement requests_in_flight in all cases where
|
||||||
|
// the current tasks ends, including the case where it gets canceled and
|
||||||
|
// doesn't run to completion (which may happen e.g. if it timeouts).
|
||||||
let _guard = InFlightGuard {
|
let _guard = InFlightGuard {
|
||||||
metrics: Arc::clone(&metrics),
|
metrics: Arc::clone(&metrics),
|
||||||
tags: &tags,
|
tags: &tags,
|
||||||
|
|
Loading…
Reference in a new issue