feat(ssh): add Sentry tracking for SSH retry events to enhance error monitoring

This commit is contained in:
Andras Bacsai
2025-09-07 18:57:20 +02:00
parent 4bd29bf966
commit 45c75ad9c1
2 changed files with 49 additions and 0 deletions

View File

@@ -62,6 +62,14 @@ trait ExecuteRemoteCommand
if ($this->isRetryableSshError($errorMessage) && $attempt < $maxRetries - 1) {
$attempt++;
$delay = $this->calculateRetryDelay($attempt - 1);
// Track SSH retry event in Sentry
$this->trackSshRetryEvent($attempt, $maxRetries, $delay, $errorMessage, [
'server' => $this->server->name ?? $this->server->ip ?? 'unknown',
'command' => remove_iip($command),
'trait' => 'ExecuteRemoteCommand',
]);
// Add log entry for the retry
if (isset($this->application_deployment_queue)) {
$this->addRetryLogEntry($attempt, $maxRetries, $delay, $errorMessage);