chore: prepare for PR
This commit is contained in:
parent
4ec32290cf
commit
ced1938d43
1 changed files with 15 additions and 18 deletions
|
|
@ -145,24 +145,21 @@ protected function trackSshRetryEvent(int $attempt, int $maxRetries, int $delay,
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
app('sentry')->captureMessage(
|
\Sentry\withScope(function (\Sentry\State\Scope $scope) use ($attempt, $maxRetries, $delay, $errorMessage, $context): void {
|
||||||
'SSH connection retry triggered',
|
$scope->setExtras([
|
||||||
\Sentry\Severity::warning(),
|
'attempt' => $attempt,
|
||||||
[
|
'max_retries' => $maxRetries,
|
||||||
'extra' => [
|
'delay_seconds' => $delay,
|
||||||
'attempt' => $attempt,
|
'error_message' => $errorMessage,
|
||||||
'max_retries' => $maxRetries,
|
'context' => $context,
|
||||||
'delay_seconds' => $delay,
|
'retryable_error' => true,
|
||||||
'error_message' => $errorMessage,
|
]);
|
||||||
'context' => $context,
|
$scope->setTags([
|
||||||
'retryable_error' => true,
|
'component' => 'ssh_retry',
|
||||||
],
|
'error_type' => 'connection_retry',
|
||||||
'tags' => [
|
]);
|
||||||
'component' => 'ssh_retry',
|
\Sentry\captureMessage('SSH connection retry triggered', \Sentry\Severity::warning());
|
||||||
'error_type' => 'connection_retry',
|
});
|
||||||
],
|
|
||||||
]
|
|
||||||
);
|
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
// Don't let Sentry tracking errors break the SSH retry flow
|
// Don't let Sentry tracking errors break the SSH retry flow
|
||||||
Log::warning('Failed to track SSH retry event in Sentry', [
|
Log::warning('Failed to track SSH retry event in Sentry', [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue