feat(ssh): add Sentry tracking for SSH retry events to enhance error monitoring
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user