How denisergocmen924/tracebox works
TraceBox records Linux machine metrics and logs locally, then sends them through a collector to remote storage for browser-based review. The main workflow is agent collection and durable spooling, collector authentication and ingestion, then dashboard browsing; commands flow back through the collector for the agent to fetch. The graph preserves the documented inventory, crash snapshots, live charts/logs, account and device management, and command capabilities. Some unsampled subsystem links are omitted; README evidence is used for documented product flows.
Main entry points: loop.py Runtime loop · main.py API application · endpoints_commands.py Command endpoints · __main__.py Agent entry point
Components 32
Machine Agent
- Agent entry point
agent/__main__.py - Runtime loop
agent/core/loop.py - Configuration
agent/core/config.py - Metric collection
agent/core/metrics.py - GPU readings
agent/core/gpu.py - Hardware inventory
agent/core/inventory.py - Log source contract
agent/logsources/base.py - Journald reader
agent/logsources/linux_journald.py - Local spool
agent/core/spool.py - Agent state
agent/core/state.py - Urgent flush
agent/core/flush.py - Agent shipper
agent/core/shipper.py - Command polling
agent/core/commands.py
Collector API
- API application
collector/main.py - Authentication
collector/auth.py - Ingest endpoints
collector/endpoints_ingest.py - Command endpoints
collector/endpoints_commands.py - Device endpoints
collector/endpoints_device.py - Account endpoints
collector/endpoints_account.py - Database access
collector/db_access.py - Supabase client
collector/supabase_client.py
Browser Dashboard
- Machine list
dashboard/app/(app)/devices/page.tsx - Machine details
dashboard/app/(app)/devices/[id]/DetailPanel.tsx - Dashboard app state
dashboard/lib/appState.tsx - Device data
dashboard/lib/devices.ts - Metric data
dashboard/lib/metrics.ts - Log data
dashboard/lib/logs.ts - Realtime updates
dashboard/lib/realtime.ts - Dashboard Supabase client
dashboard/lib/supabase.ts
Remote Storage
- Supabase storage
Other components
- Monitored machine
- Browser user
Connections 44
- Monitored machine → Agent entry point: runs
- Agent entry point → Runtime loop: starts
agent/__main__.py - Agent entry point → Configuration: loads
agent/__main__.py - Agent entry point → Agent state: loads
agent/__main__.py - Agent entry point → Journald reader: selects
agent/__main__.py - Runtime loop → Metric collection: collects
agent/core/loop.py - Metric collection → GPU readings: reads
agent/core/metrics.py - Runtime loop → Hardware inventory: collects
agent/core/loop.py - Runtime loop → Log source contract: reads via
agent/core/loop.py - Journald reader → Log source contract: implements
agent/logsources/linux_journald.py - Runtime loop → Local spool: records
agent/core/loop.py - Runtime loop → Agent state: persists
agent/core/loop.py - Runtime loop → Urgent flush: evaluates
agent/core/loop.py - Runtime loop → Agent shipper: sends via
agent/core/loop.py - Runtime loop → Command polling: polls
agent/core/loop.py - Runtime loop → Configuration: loads
agent/core/loop.py - Agent shipper → API application: sends telemetry
- Command polling → Command endpoints: fetches commands
- API application → Ingest endpoints: routes
collector/main.py - API application → Command endpoints: routes
collector/main.py - API application → Device endpoints: routes
collector/main.py - API application → Account endpoints: routes
collector/main.py - Ingest endpoints → Authentication: authenticates
collector/endpoints_ingest.py - Ingest endpoints → Database access: uses
collector/endpoints_ingest.py - Ingest endpoints → Supabase client: writes through
collector/endpoints_ingest.py - Command endpoints → Authentication: authenticates
collector/endpoints_commands.py - Command endpoints → Database access: uses
collector/endpoints_commands.py - Command endpoints → Supabase client: uses
collector/endpoints_commands.py - Authentication → Supabase client: fetches keys
collector/auth.py - API application → Supabase client: initializes
collector/main.py - Supabase client → Supabase storage: reads and writes
collector/supabase_client.py - Browser user → Machine list: browses
- Machine list → Dashboard app state: reads state
dashboard/app/(app)/devices/page.tsx - Machine list → Machine details: opens details
- Dashboard app state → Device data: loads
dashboard/lib/appState.tsx - Dashboard app state → Metric data: loads
dashboard/lib/appState.tsx - Dashboard app state → Log data: loads
dashboard/lib/appState.tsx - Dashboard app state → Realtime updates: subscribes
dashboard/lib/appState.tsx - Device data → Dashboard Supabase client: queries
dashboard/lib/devices.ts - Metric data → Dashboard Supabase client: queries
dashboard/lib/metrics.ts - Log data → Dashboard Supabase client: queries
dashboard/lib/logs.ts - Dashboard Supabase client → Supabase storage: reads data
- Machine list → API application: manages machines
- Browser user → Command endpoints: issues commands