From 9d320af9fd18dc744311824b279b2a9c1b575295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Mon, 30 Sep 2024 07:27:24 +0000 Subject: [PATCH] Log image to Sentry --- app/http.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/http.php b/app/http.php index 295c936..5dc9e98 100644 --- a/app/http.php +++ b/app/http.php @@ -125,6 +125,7 @@ $table->column('status', Table::TYPE_STRING, 256); $table->column('key', Table::TYPE_STRING, 1024); $table->column('listening', Table::TYPE_INT, 1); + $table->column('image', Table::TYPE_STRING, 1024); $table->create(); return $table; @@ -490,6 +491,7 @@ function cleanUp(Orchestration $orchestration, Table $activeRuntimes, array $net $runtimeHostname = \uniqid(); + $log->addTag('image', $image); $log->addTag('version', $version); $log->addTag('runtimeId', $runtimeName); @@ -515,6 +517,7 @@ function cleanUp(Orchestration $orchestration, Table $activeRuntimes, array $net 'updated' => $startTime, 'status' => 'pending', 'key' => $secret, + 'image' => $image, ]); /** @@ -880,6 +883,7 @@ function (string $runtimeId, ?string $payload, string $path, string $method, mix $runtimeName = System::getHostname() . '-' . $runtimeId; + $log->addTag('image', $image); $log->addTag('version', $version); $log->addTag('runtimeId', $runtimeName); @@ -982,6 +986,9 @@ function (string $runtimeId, ?string $payload, string $path, string $method, mix // Update swoole table $runtime = $activeRuntimes->get($runtimeName) ?? []; + + $log->addTag('image', $runtime['image']); + $runtime['updated'] = \time(); $activeRuntimes->set($runtimeName, $runtime);