rusackas opened a new pull request, #40868:
URL: https://github.com/apache/superset/pull/40868

   ### SUMMARY
   
   A cluster of small observability/robustness improvements to the websocket 
sidecar:
   
   - **Timestamps** — add `winston.format.timestamp()` so every log line 
carries a timestamp.
   - **Consistent logging** — route the startup secret warnings and the 
per-socket `error` handler through the configured logger instead of 
`console.*`, so they honor the configured level and JSON format.
   - **Leaner debug logs** — when debug-logging received events, log only the 
batch size rather than the raw event payloads (which carry user/job 
identifiers).
   - **Auditable upgrade rejections** — when a WebSocket upgrade is rejected 
for an invalid/absent channel token, record a structured warning (with the 
request's remote address) and a `ws_upgrade_rejected` statsd counter, instead 
of a bare error.
   - **Redis error context** — attach a Redis `error` handler so connection 
errors are logged with context.
   - **Crash safety** — add process-level 
`unhandledRejection`/`uncaughtException` handlers that log through the 
configured logger (and avoid a silent termination on newer Node versions).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — sidecar logging/robustness.
   
   ### TESTING INSTRUCTIONS
   
   ```
   cd superset-websocket
   npm ci
   npm test
   ```
   
   Existing suite passes; a new assertion verifies the `ws_upgrade_rejected` 
counter on a rejected upgrade.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to