How replit/datacat works
DataCat is a self-hosted observability product. Its main workflow is sending telemetry from agents or SDKs to the API, which decodes and stores it; users then explore metrics, logs, traces, hosts and dashboards in the web UI and manage monitors. The graph preserves those documented product areas and highlights authentication and storage as internal layers. Some query, monitor and SDK details are not excerpted, so connections to those components are omitted or marked unverified rather than inferred from names alone.
Main entry points: routes.ts Telemetry endpoints · App.tsx Web application · store.ts Telemetry writes · authMiddleware.ts Request authentication
Components 30
Telemetry senders
- Host agent
agent/main.go - Node SDK
sdks/node/index.js - Node span exporter
sdks/node/lib/span-exporter.js - Python SDK
sdks/python/src/datacat/__init__.py - Python span exporter
sdks/python/src/datacat/_span_exporter.py
API and intake
- API application
artifacts/api-server/src/app.ts - Telemetry endpoints
artifacts/api-server/src/intake/routes.ts - Payload decoding
artifacts/api-server/src/intake/decode.ts - Protocol decoding
artifacts/api-server/src/intake/proto.ts - OTLP handling
artifacts/api-server/src/intake/otlp.ts - Agent trace handling
artifacts/api-server/src/intake/agentTraces.ts
Storage and queries
- Telemetry writes
artifacts/api-server/src/intake/store.ts - Storage selection
artifacts/api-server/src/lib/storage.ts - ClickHouse access
artifacts/api-server/src/lib/ch.ts - APM rollups
artifacts/api-server/src/query/apmStats.ts - Query services
artifacts/api-server/src/query - PostgreSQL
Web product
- Web application
artifacts/web/src/App.tsx - Dashboards
artifacts/web/src/pages/Dashboards.tsx - Metrics explorer
artifacts/web/src/pages/Metrics.tsx - Log explorer
artifacts/web/src/pages/Logs.tsx - APM explorer
artifacts/web/src/pages/Apm.tsx - Host maps
artifacts/web/src/pages/Infrastructure.tsx - Monitor management
artifacts/web/src/pages/Monitors.tsx - Monitor evaluation
artifacts/api-server/src/jobs/monitors.ts
Identity and operations
- Request authentication
artifacts/api-server/src/middlewares/authMiddleware.ts - Sessions and passwords
artifacts/api-server/src/lib/auth.ts - Organizations and keys
artifacts/api-server/src/lib/org.ts
Other components
- Observability user
- Webhook and Slack
Connections 31
- Observability user → Web application: uses
artifacts/web/src/App.tsx - Web application → Dashboards: routes to
artifacts/web/src/App.tsx - Web application → Metrics explorer: routes to
artifacts/web/src/App.tsx - Web application → Log explorer: routes to
artifacts/web/src/App.tsx - Web application → APM explorer: routes to
artifacts/web/src/App.tsx - Web application → Host maps: routes to
artifacts/web/src/App.tsx - Web application → Monitor management: routes to
artifacts/web/src/App.tsx - Host agent → Telemetry endpoints: sends telemetry
- Node SDK → Node span exporter: configures
sdks/node/index.js - Node SDK → Telemetry endpoints: exports OTLP
- Python SDK → Python span exporter: uses
sdks/python/src/datacat/__init__.py - Python SDK → Telemetry endpoints: sends telemetry
- API application → Telemetry endpoints: mounts
artifacts/api-server/src/app.ts - Telemetry endpoints → Payload decoding: decodes payloads
artifacts/api-server/src/intake/routes.ts - Telemetry endpoints → Protocol decoding: decodes protobuf
artifacts/api-server/src/intake/routes.ts - Telemetry endpoints → OTLP handling: decodes OTLP
artifacts/api-server/src/intake/routes.ts - Telemetry endpoints → Agent trace handling: decodes agent traces
artifacts/api-server/src/intake/routes.ts - Telemetry endpoints → Telemetry writes: writes telemetry
artifacts/api-server/src/intake/routes.ts - Telemetry endpoints → Organizations and keys: resolves API key
artifacts/api-server/src/intake/routes.ts - Telemetry writes → ClickHouse access: inserts telemetry
artifacts/api-server/src/intake/store.ts - Telemetry writes → APM rollups: records span stats
artifacts/api-server/src/intake/store.ts - Telemetry writes → PostgreSQL: writes when selected
- Telemetry writes → Storage selection: selects backend
artifacts/api-server/src/intake/store.ts - Query services → ClickHouse access: queries optionally
artifacts/api-server/src/query/searchCh.ts - Query services → PostgreSQL: queries by default
- API application → Request authentication: protects API
artifacts/api-server/src/app.ts - Request authentication → Sessions and passwords: checks sessions
artifacts/api-server/src/middlewares/authMiddleware.ts - Request authentication → Organizations and keys: resolves membership
artifacts/api-server/src/middlewares/authMiddleware.ts - Web application → Query services: requests data
- Monitor evaluation → Webhook and Slack: notifies
- Observability user → Monitor management: configures monitors