Overview
S2 Lite provides built-in monitoring endpoints for health checks and metrics collection, making it easy to integrate with your observability stack.Health Checks
The/health endpoint provides a simple way to check if S2 Lite is running and ready to accept requests.
Endpoint Details
- URL:
/health - Method: GET
- Success Response: HTTP 200 OK
- Use Cases: Readiness probes, liveness probes, load balancer health checks
Example Usage
Kubernetes Probes
Prometheus Metrics
S2 Lite exposes internal metrics in Prometheus text format at the/metrics endpoint.
The
/metrics endpoint returns Prometheus-formatted metrics for operational monitoring, not business metrics like storage or throughput.Available Metrics
S2 Lite tracks the following operational metrics:Append Latency Metrics
s2_append_permit_latency_seconds
- Type: Histogram
- Description: Time taken to acquire permission to append
- Buckets: 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms, 1s, 2.5s
s2_append_ack_latency_seconds
- Type: Histogram
- Description: End-to-end append acknowledgment latency
- Buckets: 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms, 1s, 2.5s
Batch Size Metrics
s2_append_batch_records
- Type: Histogram
- Description: Number of records per append batch
- Buckets: 1, 10, 50, 100, 250, 500, 1000
s2_append_batch_bytes
- Type: Histogram
- Description: Size in bytes of append batches
- Buckets: 512B, 1KB, 4KB, 16KB, 64KB, 256KB, 512KB, 1MB
Scraping Metrics
Prometheus Configuration
Prometheus Scrape Config
Add S2 Lite as a scrape target inprometheus.yml:
Kubernetes ServiceMonitor
If using Prometheus Operator:Helm Chart Configuration
When using the S2 Lite Helm chart:Grafana Dashboards
Sample Queries
Average Append Latency (P50, P95, P99)Example Grafana Panel
API Metrics (Cloud Only)
For programmatic access to business metrics (storage, throughput, operations), use the S2 cloud service:Alerting
Sample Prometheus Alerts
Logging
S2 Lite outputs structured logs to stdout. Configure log level using theRUST_LOG environment variable:
Performance Monitoring
SlateDB Configuration
S2 Lite uses SlateDB as its storage engine. Configure SlateDB settings usingSL8_ prefixed environment variables:
Lower flush intervals improve write latency but may increase object storage API calls.
Monitoring Best Practices
- Set up health checks - Use
/healthfor liveness and readiness probes - Monitor append latency - Track P95 and P99 latency to detect performance degradation
- Alert on downtime - Configure alerts when S2 Lite becomes unavailable
- Track batch sizes - Understand your workload patterns
- Use structured logging - Enable JSON logging for better log aggregation
- Monitor resource usage - Track CPU, memory, and network metrics at the infrastructure level