Ingestion Methods
Slung supports the following ingestion methods:Binary WebSocket Protocol
The primary ingestion method uses a binary WebSocket protocol that sends metrics as compact binary frames. Each frame contains:- Timestamp (Unix microseconds)
- Numeric value
- Series name
- Optional tags for metadata
- High throughput: Compact binary encoding minimizes bandwidth
- Low latency: WebSocket connections eliminate HTTP overhead
- Simplicity: Single connection handles all metrics
Connection Details
Default WebSocket URL:ws://127.0.0.1:2077
Connect using any WebSocket client and send binary frames following the WebSocket protocol specification.
Client SDKs
Official client SDKs handle protocol encoding and connection management:- TypeScript/Node.js: Full-featured SDK with streaming support
Message Format
Every metric message contains:timestamp: Unix epoch in microseconds (i64)value: Floating-point metric value (f64)series: Series name identifying the metric typetags: Key-value pairs for dimensions (e.g.,sensor=1,env=prod)
Next Steps
WebSocket Protocol
Binary protocol specification and encoding details
Client SDKs
Use official SDKs to simplify integration