Lightweight Observability Bridge for Modern Applications
Unify logs, metrics, and traces without the cloud vendor lock-in
- Unified Ingestion API - Accepts logs (Syslog/JSON), metrics (Prometheus-style), traces (OpenTelemetry-compatible)
- Real-time Dashboard - WebSocket-powered live tailing and visualization
- Embedded Storage - SQLite with automatic WAL mode optimization
- CLI First Design - Pipe-friendly interface for Unix-style workflows
- Extensible Core - Pluggable architecture for storage backends and processors
This project is under active development. Currently implemented:
- Project structure and foundation
- Core data models for logs, metrics, and traces
- SQLite storage with WAL mode
- Basic HTTP server framework
- Processor interface
- HTTP logs ingestion API endpoint
- HTTP metrics ingestion API endpoint (with Prometheus support)
- HTTP traces/spans ingestion API endpoints
- CLI for log streaming
- Dashboard backend
- Dashboard frontend (not real-time yet)
- Demo script for visualization
- Client libraries
- Alerting system
To see Pulse in action with simulated data, run the demo script:
# Run the demo
./scripts/run_demo.sh
This will:
- Start the Pulse server
- Open the dashboard in your browser
- Generate sample metrics, traces, and logs from simulated services
- Display the data in real-time on the dashboard
Press Ctrl+C to stop the demo.
Send structured log entries via HTTP:
# Send log entry
curl -X POST http://localhost:8080/logs \
-H "Content-Type: application/json" \
-d '{
"message": "User login successful",
"level": "INFO",
"service": "auth-service",
"timestamp": "2023-06-15T14:23:10Z",
"tags": {"user_id": "12345", "method": "oauth"}
}'
# Send custom metric
curl -X POST http://localhost:8080/metrics \
-H "Content-Type: application/json" \
-d '{
"name": "api.latency",
"value": 142.7,
"type": "gauge",
"service": "payment-api",
"tags": {"endpoint": "/users", "status": "200"}
}'
# Send histogram metric
curl -X POST http://localhost:8080/metrics \
-H "Content-Type: application/json" \
-d '{
"name": "api.request_duration",
"value": 0.237,
"type": "histogram",
"service": "payment-api",
"buckets": [0.01, 0.05, 0.1, 0.5, 1.0, 5.0],
"tags": {"endpoint": "/transactions"}
}'
# Send metrics in Prometheus text format
curl -X POST http://localhost:8080/metrics \
-H "Content-Type: text/plain" \
-d '# HELP http_requests_total The total number of HTTP requests.
# TYPE http_requests_total counter
http_requests_total{method="post",code="200",service="api-server"} 1027
http_requests_total{method="get",code="200",service="api-server"} 9836
# HELP http_request_duration_seconds The HTTP request latencies in seconds.
# TYPE http_request_duration_seconds gauge
http_request_duration_seconds{path="/api/users",service="user-service"} 0.043'
# Scrape metrics in Prometheus format
curl -X GET http://localhost:8080/metrics
# Send an individual span
curl -X POST http://localhost:8080/spans \
-H "Content-Type: application/json" \
-d '{
"name": "process_payment",
"service": "payment-service",
"start_time": "2023-06-15T14:23:10Z",
"duration_ms": 127,
"status": "OK",
"tags": {
"user_id": "12345",
"payment_id": "pay_78932"
}
}'
# Send a complete trace with multiple spans
curl -X POST http://localhost:8080/traces \
-H "Content-Type: application/json" \
-d '{
"spans": [
{
"name": "http_request",
"service": "api-gateway",
"start_time": "2023-06-15T14:23:10Z",
"duration_ms": 254,
"status": "OK",
"tags": {
"http.method": "POST",
"http.url": "/api/checkout"
}
},
{
"name": "validate_cart",
"service": "cart-service",
"parent_id": "span-1",
"start_time": "2023-06-15T14:23:10.050Z",
"duration_ms": 15,
"status": "OK",
"tags": {
"cart_id": "cart_12345"
}
},
{
"name": "process_payment",
"service": "payment-service",
"parent_id": "span-1",
"start_time": "2023-06-15T14:23:10.070Z",
"duration_ms": 127,
"status": "OK",
"tags": {
"payment_id": "pay_78932"
}
}
]
}'
- Go 1.19 or later
- SQLite 3.x
# Clone the repository
git clone https://github.com/karansingh/pulse.git
cd pulse
# Install dependencies
go mod download
# Build the application
go build -o pulse ./cmd/pulse
# Run the server
./pulse --port 8080 --db pulse.db --data-dir ./data
Currently implemented:
GET /health
- Health check endpointPOST /logs
- Submit log entriesPOST /logs/batch
- Submit multiple log entriesPOST /metrics
- Submit metrics (JSON or Prometheus format)GET /metrics
- Scrape metrics in Prometheus formatPOST /traces
- Submit complete tracesPOST /spans
- Submit individual spans
Dashboard API:
GET /api/logs
- Query logs with filteringGET /api/metrics
- Query metrics with filteringGET /api/traces
- Query traces with filteringGET /api/spans
- Query spans with filteringGET /api/services
- Get list of available servicesGET /api/stats
- Get summary statistics
WebSocket endpoints:
WS /ws/logs
- Real-time log streamingWS /ws/metrics
- Real-time metrics streamingWS /ws/traces
- Real-time traces streaming
Pulse follows a clean architecture pattern with:
- Core domain models in
pkg/models
- Storage interfaces and implementations in
pkg/storage
- API handlers in
pkg/api
- Event processing pipeline in
pkg/processor
- Data is ingested through HTTP API endpoints
- Processor chain processes and enriches the data
- Storage system persists the data
- Metrics and traces can be queried and visualized through APIs
- Structure: Timestamped entries with a message, level, and optional metadata
- Storage: SQLite
logs
table with efficient indexing - Usage: Debugging, event tracking, audit trails
- Types: Counter, Gauge, Histogram, Summary
- Storage: SQLite
metrics
andhistogram_metrics
tables - Formats: JSON and Prometheus exposition format
- Aggregation: Sum, Average, Min, Max, Percentiles (for histograms)
- Structure: Collection of spans forming a request execution path
- Correlation: Trace IDs, Span IDs, and Parent IDs for relationship tracking
- Context Propagation: Via HTTP headers or explicit IDs
- Storage: SQLite
spans
andtraces
tables
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
A modern React-based dashboard for monitoring logs, metrics, and traces.
- Modern UI: Built with React and Material-UI for a clean, responsive interface
- Real-time Updates: Live streaming of logs, metrics, and traces
- Filtering: Powerful filtering capabilities for all data types
- Pagination: Efficient handling of large datasets
- Responsive Design: Works on desktop and mobile devices
- Overview: Dashboard summary and quick access to key features
- Logs: View and filter application logs in real-time
- Metrics: Monitor application performance metrics
- Traces: Analyze request traces across your distributed system
- Settings: Configure dashboard preferences
- Node.js (v14 or later)
- npm or yarn
-
Clone the repository:
git clone https://github.com/karansingh/pulse.git cd pulse/dashboard-react
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open your browser and navigate to
http://localhost:3000
npm run build
The build artifacts will be stored in the dist/
directory.
dashboard-react/
├── public/ # Static files
├── src/ # Source code
│ ├── components/ # React components
│ │ ├── pages/ # Page components
│ ├── hooks/ # Custom React hooks
│ ├── utils/ # Utility functions
│ ├── contexts/ # React contexts
│ ├── App.jsx # Main App component
│ └── index.js # Entry point
├── package.json # Dependencies and scripts
└── webpack.config.js # Webpack configuration
This project is licensed under the MIT License - see the LICENSE file for details.