How It Works
Starting a Stream
Via API
Connecting to WebSocket
Filtering Logs
Apply filters to reduce noise and focus on relevant logs:Level Filter
Source Filter
Pattern Filter
Combined Filters
Session Timeouts
All streaming sessions have mandatory timeouts:| Setting | Value |
|---|---|
| Default timeout | 5 minutes |
| Maximum timeout | 1 hour |
| Warning before end | 30 seconds |
Timeout Warning
30 seconds before a session ends, you’ll receive a control message:Extending a Session
To continue streaming, start a new session before the current one ends:Stopping a Stream
Manually stop streaming when done:Viewing Active Sessions
List all active streaming sessions:Log Message Format
Each log message contains:Use Cases
Incident Response
Stream logs from affected agents during an outage to identify root cause.
Debugging
Watch real-time logs while reproducing an issue in production.
Deployment Verification
Monitor logs during deployments to catch errors immediately.
Security Investigation
Stream logs to investigate suspicious activity or security alerts.
Best Practices
Use Filters
Use Filters
Always apply filters to reduce bandwidth and focus on relevant logs.
Streaming everything can overwhelm both the network and your analysis.
Set Appropriate Timeouts
Set Appropriate Timeouts
Use the shortest timeout that meets your needs. 5 minutes is usually
sufficient for quick debugging sessions.
Stop When Done
Stop When Done
Manually stop sessions when you’re done troubleshooting. Don’t rely
on timeouts for cleanup.
Monitor Usage
Monitor Usage
Keep an eye on active sessions across your organization to avoid
excessive bandwidth usage.
Bandwidth Considerations
Streaming full logs consumes significantly more bandwidth than metrics:| Mode | Bandwidth (est.) |
|---|---|
| Metrics only | ~10 KB/hour |
| Streaming (filtered) | ~1-10 MB/hour |
| Streaming (all logs) | ~100+ MB/hour |
Client Libraries
JavaScript/TypeScript
Python
Client libraries are coming soon. See the WebSocket documentation
for implementing streaming with raw WebSockets.