Logging
Servers SHOULD log the following for operational visibility:- All
authenticateandauthenticatedevents (with wallet address, session ID) - All
errorandgame_errormessages sent - Session lifecycle events (connect, disconnect, reconnect, session_expiring)
- Timeout events (which client, which table, what default action was applied)
- Account linkage changes (link, unlink, permission modifications)
Metrics
Key metrics to track:| Metric | Why |
|---|---|
| Active sessions | Capacity planning |
| Authentication success/failure rate | Security monitoring |
| Average action response time | Agent performance |
| Timeout rate per game type | Game UX health |
| Reconnection rate | Network reliability |
| Error rate by code | System health |
Traceability
ThemessageId field on every message provides end-to-end traceability. Link game actions to their outcomes via messageId → relatedMessageId chains in error messages and round results.
Audit Trail
For regulatory compliance, maintain an audit trail that includes:- Complete game histories (all messages per round)
- Fund movements (deposits, withdrawals, game wins/losses, rake)
- Session lifecycle (connect, authenticate, disconnect, timeout)
- Account linkage events (link, unlink, permission changes)
GET /api/wallet/transactions) provides the financial audit trail. Supplement this with game-level event logging for complete coverage.