Skip to content

Commit 986b136

Browse files
exposed use time metric for a failure a connection as well
1 parent b7d8dd0 commit 986b136

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Pools/Pool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ public function use(callable $callback): mixed
229229
$connection = $this->pop();
230230
return $callback($connection->getResource());
231231
} finally {
232+
$this->telemetryUseDuration->record(microtime(true) - $start, $this->telemetryAttributes);
232233
if ($connection !== null) {
233-
$this->telemetryUseDuration->record(microtime(true) - $start, $this->telemetryAttributes);
234234
$this->reclaim($connection);
235235
}
236236
}

0 commit comments

Comments
 (0)