Thank you for your interest in contributing to DrishtiScope! DrishtiScope is an open-source, high-performance, real-time observability platform designed to monitor, trace, and understand any running process on Linux and Windows (e.g. backend web services, compilers, developer CLI utilities, background workers, and AI agent runtimes) at the operating system level without requiring code changes to the target process.
We welcome contributions from developers, Linux systems engineers, kernel enthusiasts, site reliability specialists, and open-source contributors worldwide.
- Code of Conduct
- Architecture Overview
- Development Environment Setup
- Running DrishtiScope Locally
- Frontend Development Guidelines
- Backend Development Guidelines
- Adding New Metrics to the Metric Encyclopedia
- Automated Testing & Coverage (>90%)
- Submitting a Pull Request
- Release Engineering with GoReleaser
We are dedicated to providing a welcoming, inclusive, and harassment-free environment for everyone. Please treat all contributors and maintainers with kindness, respect, and empathy.
┌─────────────────────────────────┐
│ Target Process │
│ (e.g., node, python, worker) │
└──────────────┬──────────────────┘
│
┌───────────────────────────┴──────────────────────────┐
│ │
▼ ▼
[Linux Kernel Space] [Userspace /proc]
eBPF Tracepoints: /proc/[pid]/stat, status,
• raw_syscalls:sys_enter/sys_exit statm, io, fd, net/tcp
• sched_process_exec / sched_process_exit Real process scanning
│ │
└───────────────────────────┬──────────────────────────┘
│
▼
┌───────────────────────────────┐
│ DrishtiScope Go Backend │
│ (:8080 HTTP & WebSocket) │
├───────────────────────────────┤
│ • Real-time Sliding Window │
│ • Embedded SQLite TSDB (WAL) │
│ • Prometheus /metrics │
│ • Perfetto & Structured Logs │
│ • Copilot Diagnostic API │
└──────────────┬────────────────┘
│ WebSocket (400ms ticks)
▼
┌───────────────────────────────┐
│ DrishtiScope React SPA │
│ (TypeScript + Tailwind) │
├───────────────────────────────┤
│ 1. Process Story (Activity) │
│ 2. Overview (Signals & SLO) │
│ 3. Execution & CPU (Traces) │
│ 4. System Metrics (Telemetry) │
│ 5. Security & Logs (Audit) │
│ • Metric Help Encyclopedia │
│ • Interactive Copilot Drawer │
└───────────────────────────────┘
- Go: Version 1.27 or newer (
go version) - Node.js: Version 20 or newer (
node -v) - npm: Version 9 or newer (
npm -v) - Linux (native or WSL2 on Windows 10/11) with kernel headers for eBPF compilation (optional for mock/proc modes)
- GoReleaser: v2.0+ (optional, for release builds)
git clone https://github.com/developer1622/drishtiscope-oss.git
cd drishtiscope-ossIn one terminal:
cd backend
go run ./cmd/agentscopeThe server will start on http://127.0.0.1:8080.
By default, it automatically scans for running processes (such as python, node, my-service) and collects live kernel vitals.
In a second terminal:
cd frontend
npm install
npm run devOpen http://localhost:5173 in your browser. The Vite dev server will connect to ws://127.0.0.1:8080/ws with real-time updates.
- Tech Stack: React 18, TypeScript, Tailwind CSS, Recharts, Lucide Icons, Zustand.
- Anti-Flicker Mode: Ensure all Recharts components use
isAnimationActive={!antiFlicker}(retrieved fromuseScopeStore) to prevent UI stutter and eye-strain during 400ms streaming updates. - Type Safety: No
anytypes. Runnpx tsc --noEmitbefore submitting. - Tone & Scope:
- DrishtiScope is an open-source, vendor-neutral tool.
- Avoid mentioning specific commercial products or comparing against vendor tools in UI copy.
- The tool is dedicated to Universal Process Observability across any Linux or Windows workload.
- Process Hierarchy:
- Always allow users to click any process in the hierarchy or process table and toggle it as the active target using
setSelectedPid()andsetTarget().
- Always allow users to click any process in the hierarchy or process table and toggle it as the active target using
- Package Structure:
cmd/agentscope/main.go: Entry point, lifecycle management, graceful shutdown.internal/api/: HTTP endpoints (/api/snapshot,/api/target,/api/chat,/api/history,/metrics,/healthz).internal/agg/: Ring buffers, exponential moving averages, snapshot aggregation.internal/enrich/:/procparsers (stat,statm,io,fd,net/tcp).internal/mock/realproc.go: Real process inspector for running application environments.internal/ebpfagent/: Cilium eBPF probe loader and ringbuf reader.internal/storage/: SQLite TSDB engine with WAL checkpointing.
- Code Style:
- Follow standard Go idioms (
gofmt -s -w .,go vet ./...). - Keep allocations on the hot path minimal.
- Never swallow errors silently; log or handle them properly.
- Follow standard Go idioms (
DrishtiScope features a built-in, engineer-friendly Metric Encyclopedia Modal accessible via colorful question mark badges throughout the dashboard.
To add or update metric explanations:
- Open
frontend/src/data/metricDocs.ts. - Add an entry conforming to the
MetricDocinterface:export interface MetricDoc { id: string; title: string; category: 'Core Agent Signals' | 'Compute & CPU' | 'Memory & RAM' | 'Storage & Disk' | 'Network & Sockets' | 'Processes & Threads' | 'Security & Audit' | 'Kernel & eBPF'; themeColor: 'cyan' | 'blue' | 'emerald' | 'amber' | 'rose' | 'purple'; shortDefinition: string; juniorAdminExplanation: string; // Plain-English analogy for engineers howToRead: { unit: string; healthy: string; warning: string; critical: string; }; whyAiAgentsCare: string; // Operational impact on the process and system linuxAdminCommand: string; // Copyable Linux command to verify independently kernelDataSource: string; // Kernel file or eBPF probe source }
- Mount a
<MetricHelpButton metricId="your_metric_id" />adjacent to the KPI card or chart.
Every PR must pass existing tests and maintain high test coverage:
cd backend
go test -v -cover ./...To generate HTML coverage reports:
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.htmlcd frontend
npm run buildDrishtiScope ships a full Playwright E2E suite covering all 5 dashboard tabs, the metric help encyclopedia, the copilot drawer, the process search omnibox, and telemetry mode switching.
# Start the backend in mock mode (for reproducible tests)
cd backend && go run ./cmd/agentscope -mode=mock -addr=127.0.0.1:8080 &
# In a separate terminal, run Playwright
cd frontend
npm run test:e2eTo view an interactive HTML test report after a run:
npx playwright show-reportThe CI pipeline also runs Playwright automatically on every PR via the playwright job in .github/workflows/ci.yml.
- Fork the repository on GitHub.
- Create a feature branch:
git checkout -b feature/process-memory-tracing. - Commit your changes with clear, descriptive commit messages:
feat: add thread pool latency histogram to StoryTabfix: prevent layout shift on high-frequency socket reconnect
- Run tests and verify builds pass locally:
cd backend && go test ./... cd ../frontend && npm run build
- Push to your fork and submit a PR to
main. - Maintainers will review your PR and provide constructive feedback.
DrishtiScope uses GoReleaser for cross-compiling releases for Linux, Windows, and macOS (amd64 and arm64).
To verify the release pipeline locally:
# Verify configuration
goreleaser check
# Dry-run snapshot build for all 6 platforms
goreleaser build --snapshot --cleanThank you for helping improve DrishtiScope and contributing to open-source systems observability!