Skip to content

WatchData is a lightweight, open-source observability application built to help developers monitor, debug, and explore their system. It collects and displays logs ๐Ÿ“œ, metrics ๐Ÿ“ˆ, and traces ๐Ÿ”โ€” making observability simple, and accessible for developers.

License

Notifications You must be signed in to change notification settings

TridipDam/watchdata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

73 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
WatchData logo

WatchData

๐Ÿ” Lightweight Observability Platform for Modern Applications

Go Version OpenTelemetry ClickHouse License: MIT Docker

Collect, store, and explore your application's telemetry data with ease


โœจ What is WatchData?

WatchData is a high-performance, open-source observability platform designed for developers who need powerful monitoring without the complexity. Built on OpenTelemetry standards and powered by ClickHouse, it provides real-time insights into your applications' logs, metrics, and traces.

๐ŸŽฏ Perfect For

  • Solo Developers building side projects
  • Small Teams needing cost-effective monitoring
  • Learning observability concepts hands-on
  • Prototyping before scaling to enterprise solutions

๐Ÿš€ Key Features

๐Ÿ“Š Data Collection

  • OpenTelemetry Protocol (OTLP) support
  • Multiple ingestion methods (gRPC, HTTP, files)
  • Real-time processing with batching
  • Auto-discovery of telemetry data

โšก High Performance

  • ClickHouse backend for blazing-fast queries
  • Columnar storage with compression
  • Time-series optimization
  • Horizontal scaling ready

๐ŸŽจ Modern UI

  • Real-time dashboards with WebSocket updates
  • Interactive log exploration
  • Time-range filtering
  • Responsive design for all devices

๐Ÿ”ง Developer Experience

  • Docker Compose for instant setup
  • Comprehensive APIs for integration
  • Extensive documentation
  • Active community support

๐Ÿ—๏ธ Architecture

graph TB
    A[Applications] -->|OTLP gRPC| B[OpenTelemetry Collector]
    B -->|Custom Exporter| C[ClickHouse Database]
    C -->|Query API| D[API Server]
    D -->|REST/WebSocket| E[Frontend Dashboard]
    D -->|Real-time| F[WebSocket Clients]
    
    style A fill:#e1f5fe
    style B fill:#f3e5f5
    style C fill:#fff3e0
    style D fill:#e8f5e8
    style E fill:#fce4ec
Loading

Learn more: ๐Ÿ“– Architecture Documentation


โšก Quick Start

Prerequisites

  • Docker & Docker Compose (recommended)
  • Go 1.24+ (for development)
  • Node.js 18+ (for frontend development)

๐Ÿณ Docker Setup (Recommended)

# Clone the repository
git clone https://github.com/Ricky004/watchdata.git
cd watchdata

# Start all services
make up

# Check logs
make logs

# Your services are now running:
# - ClickHouse: http://localhost:8123
# - Collector: grpc://localhost:4317  
# - API Server: http://localhost:8080
# - Frontend: http://localhost:3000

๐Ÿ› ๏ธ Development Setup

# Setup development environment
make dev-setup

# Build all components
make build

# Run server (in one terminal)
make run-server

# Send test data (in another terminal)  
make run-client

๐Ÿ“ก Sending Data

Using OpenTelemetry SDKs

๐ŸŸข Node.js Example
const { NodeSDK } = require('@opentelemetry/sdk-node');
const { OTLPLogExporter } = require('@opentelemetry/exporter-logs-otlp-grpc');

const sdk = new NodeSDK({
  logRecordProcessor: new BatchLogRecordProcessor(
    new OTLPLogExporter({
      url: 'http://localhost:4317',
    })
  ),
});

sdk.start();

// Your application logs will now be sent to WatchData
console.log('Hello from my application!');
๐Ÿ”ต Python Example
from opentelemetry import logs
from opentelemetry.exporter.otlp.proto.grpc._log_exporter import OTLPLogExporter
from opentelemetry.sdk.logs import LoggerProvider, LoggingHandler
from opentelemetry.sdk.logs.export import BatchLogRecordProcessor

# Configure OpenTelemetry
logs.set_logger_provider(LoggerProvider())
exporter = OTLPLogExporter(endpoint="http://localhost:4317", insecure=True)
logs.get_logger_provider().add_log_record_processor(
    BatchLogRecordProcessor(exporter)
)

# Your application logs will now be sent to WatchData
import logging
logging.info("Hello from my Python application!")
๐ŸŸก Go Example
package main

import (
    "context"
    "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc"
    "go.opentelemetry.io/otel/log/global"
    "go.opentelemetry.io/otel/sdk/log"
)

func main() {
    exporter, _ := otlploggrpc.New(context.Background(),
        otlploggrpc.WithEndpoint("http://localhost:4317"),
        otlploggrpc.WithInsecure(),
    )
    
    processor := log.NewBatchProcessor(exporter)
    provider := log.NewLoggerProvider(log.WithProcessor(processor))
    global.SetLoggerProvider(provider)
    
    // Your application logs will now be sent to WatchData
    logger := global.GetLoggerProvider().Logger("my-app")
    logger.Emit(context.Background(), log.Record{
        Body: log.StringValue("Hello from my Go application!"),
    })
}

Using the Built-in Client

# Send test logs
make run-client

# Or run directly
go run cmd/client/main.go

๐ŸŽ›๏ธ API Reference

REST Endpoints

Method Endpoint Description
GET /v1/logs Retrieve recent logs
GET /v1/logs/since?timestamp=<unix> Get logs since timestamp
GET /v1/logs/timerange?start=<unix>&end=<unix> Query logs in time range

WebSocket

// Real-time log streaming
const ws = new WebSocket('ws://localhost:8080/ws');
ws.onmessage = (event) => {
  const logData = JSON.parse(event.data);
  console.log('New log:', logData);
};

๐Ÿ”ง Configuration

Environment Variables

# ClickHouse Configuration
CLICKHOUSE_HOST=localhost
CLICKHOUSE_PORT=9000
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=pass

# Server Configuration  
SERVER_PORT=8080
LOG_LEVEL=info

Custom Collector Config

Edit configs/otel-collector-config.yaml:

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

exporters:
  watchdataexporter:
    dsn: "tcp://clickhouse:9000/default?username=default&password=pass"
    
service:
  pipelines:
    logs:
      receivers: [otlp]
      exporters: [watchdataexporter]

๐Ÿ“Š Performance

WatchData is built for performance:

  • ๐Ÿš€ 10,000+ logs/second ingestion rate
  • โšก Sub-second query response times
  • ๐Ÿ’พ 90% compression ratio with ClickHouse
  • ๐Ÿ”„ Real-time WebSocket updates
  • ๐Ÿ“ˆ Horizontal scaling support

๐Ÿ›ฃ๏ธ Roadmap

๐ŸŽฏ Current Focus (v1.0)

  • OpenTelemetry log ingestion
  • ClickHouse storage backend
  • REST API with WebSocket support
  • Docker Compose deployment
  • Frontend dashboard (Next.js)
  • Authentication & authorization

๐Ÿ”ฎ Future Plans (v2.0+)

  • Metrics support (Prometheus-compatible)
  • Distributed tracing visualization
  • Alerting system with webhooks
  • Multi-tenancy support
  • Kubernetes operator
  • Advanced analytics and ML insights

๐Ÿค Contributing

We love contributions! Here's how you can help:

๐Ÿ› Found a Bug?

Open an issue with details

๐Ÿ’ก Have an Idea?

Start a discussion to share your thoughts

๐Ÿ”ง Want to Code?

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Read our Contributing Guide for detailed instructions.


๐Ÿ“š Documentation


๐Ÿ’ฌ Community & Support

GitHub Discussions Issues


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


โญ Star this repo if you find it useful!

Made with โค๏ธ by Tridip Dam and contributors

About

WatchData is a lightweight, open-source observability application built to help developers monitor, debug, and explore their system. It collects and displays logs ๐Ÿ“œ, metrics ๐Ÿ“ˆ, and traces ๐Ÿ”โ€” making observability simple, and accessible for developers.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published