Enable Discovery debug logging for production troubleshooting

- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -0,0 +1,75 @@
<?php
declare(strict_types=1);
namespace App\Framework\Database\Monitoring\Dashboard;
use App\Framework\Database\DatabaseManager;
use App\Framework\Database\Monitoring\Health\DatabaseHealthChecker;
use App\Framework\Http\Controller;
use App\Framework\Http\Response\JsonResponse;
use App\Framework\Http\Response\Response;
use App\Framework\Http\Response\ViewResponse;
use App\Framework\View\ViewRenderer;
/**
* Controller for the database health dashboard
*/
final readonly class DatabaseHealthController implements Controller
{
public function __construct(
private DatabaseManager $databaseManager,
private DatabaseHealthChecker $healthChecker,
private ViewRenderer $viewRenderer
) {
}
/**
* Dashboard home page
*/
#[Route('/admin/database/health', name: 'database_health')]
public function dashboard(): Response
{
$connections = $this->databaseManager->getConnectionNames();
return new ViewResponse(
$this->viewRenderer->render('admin/database/health', [
'connections' => $connections,
])
);
}
/**
* Get health check results for a specific connection
*/
#[Route('/admin/database/health/{connection}', name: 'database_health_connection')]
public function connectionHealth(string $connection = 'default'): Response
{
if (! $this->databaseManager->hasConnection($connection)) {
return new JsonResponse([
'error' => "Connection '{$connection}' not found",
], 404);
}
$result = $this->healthChecker->checkHealth($connection);
return new JsonResponse($result->toArray());
}
/**
* Get health check results for all connections
*/
#[Route('/admin/database/health/all', name: 'database_health_all')]
public function allConnectionsHealth(): Response
{
$connections = $this->databaseManager->getConnectionNames();
$results = [];
foreach ($connections as $connection) {
$result = $this->healthChecker->checkHealth($connection);
$results[$connection] = $result->toArray();
}
return new JsonResponse($results);
}
}