Skip to main content

Logging

Servers SHOULD log the following for operational visibility:
  • All authenticate and authenticated events (with wallet address, session ID)
  • All error and game_error messages 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)
Servers MUST NOT log authentication tokens or wallet private keys.

Metrics

Key metrics to track:
MetricWhy
Active sessionsCapacity planning
Authentication success/failure rateSecurity monitoring
Average action response timeAgent performance
Timeout rate per game typeGame UX health
Reconnection rateNetwork reliability
Error rate by codeSystem health

Traceability

The messageId field on every message provides end-to-end traceability. Link game actions to their outcomes via messageIdrelatedMessageId 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)
The transaction history endpoint (GET /api/wallet/transactions) provides the financial audit trail. Supplement this with game-level event logging for complete coverage.