Monitoring Guide
How to monitor and debug your Verani application.
View Logs
Stream real-time logs:
wrangler tail
Filter logs:
wrangler tail --format pretty
Metrics
View metrics in Cloudflare Dashboard:
- Workers & Pages → Your Worker → Metrics
Key metrics:
- Requests: WebSocket upgrade requests
- Errors: Connection failures
- CPU Time: Processing time per request
- Duration: Time Actor stays active
Debugging Tips
Check Server Logs
Use wrangler tail to see real-time server logs:
# Basic tail
wrangler tail
# Pretty format
wrangler tail --format pretty
# Filter by status
wrangler tail --status error
Browser DevTools
Use browser DevTools to inspect WebSocket connections:
- Open DevTools → Network tab
- Filter by WS (WebSocket)
- Click on your WebSocket connection
- View messages in the Messages tab
Common Log Patterns
Connection established:
[Verani] User alice connected (client: abc-123)
Message received:
[Verani] Received message: {"type":"chat.message","data":{"text":"Hello"}}
Error occurred:
[Verani] Error for user alice: Error message here
Related Documentation
- Deployment Guide - Deployment steps
- Troubleshooting - Common issues and solutions
- Scaling Guide - Performance monitoring