fix(Discovery): Add comprehensive debug logging for router initialization

- Add initializer count logging in DiscoveryServiceBootstrapper
- Add route structure analysis in RouterSetup
- Add request parameter logging in HttpRouter
- Update PHP production config for better OPcache handling
- Fix various config and error handling improvements
This commit is contained in:
2025-10-27 22:23:18 +01:00
parent e326e3d6c6
commit 70e45fb56e
56 changed files with 1519 additions and 355 deletions

View File

@@ -48,7 +48,8 @@ final readonly class ErrorReport
public static function fromThrowable(
Throwable $throwable,
string $level = 'error',
array $context = []
array $context = [],
?string $environment = null
): self {
return new self(
id: self::generateId(),
@@ -60,7 +61,7 @@ final readonly class ErrorReport
line: $throwable->getLine(),
trace: $throwable->getTraceAsString(),
context: $context,
environment: $_ENV['APP_ENV'] ?? 'production',
environment: $environment ?? 'production',
serverInfo: self::getServerInfo()
);
}
@@ -72,7 +73,8 @@ final readonly class ErrorReport
string $level,
string $message,
array $context = [],
?Throwable $exception = null
?Throwable $exception = null,
?string $environment = null
): self {
return new self(
id: self::generateId(),
@@ -84,7 +86,7 @@ final readonly class ErrorReport
line: $exception?->getLine() ?? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['line'] ?? 0,
trace: $exception?->getTraceAsString() ?? self::getCurrentTrace(),
context: $context,
environment: $_ENV['APP_ENV'] ?? 'production',
environment: $environment ?? 'production',
serverInfo: self::getServerInfo()
);
}