handle /ws_debug/health in debugger and add request logging (#8426)
- Fix debugger HTTP health endpoint to also match /ws_debug/health (ingress forwards the full path, not just /health) - Add request logging to all three extra services (LSP, multiplayer, debugger) for HTTP and WebSocket ping/upgrade events Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1069,11 +1069,14 @@ const server = Bun.serve({
|
||||
|
||||
// Handle WebSocket upgrade with path-based routing
|
||||
if (server.upgrade(req, { data: { path } })) {
|
||||
logger.info(`WS upgrade: ${path}`)
|
||||
return undefined as unknown as Response
|
||||
}
|
||||
|
||||
logger.info(`HTTP ${req.method} ${path}`)
|
||||
|
||||
// Health check endpoint
|
||||
if (path === '/health') {
|
||||
if (path === '/health' || path === '/ws_debug/health') {
|
||||
return new Response(JSON.stringify({
|
||||
status: 'ok',
|
||||
service: 'debugger',
|
||||
@@ -1102,6 +1105,7 @@ const server = Bun.serve({
|
||||
|
||||
// Handle ping test — respond and close immediately
|
||||
if (path === '/ping') {
|
||||
logger.info(`WS ping test`)
|
||||
ws.send(JSON.stringify({ type: 'pong', service: 'debugger' }))
|
||||
ws.close()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user