How labstack/pitot works
Pitot is a single-binary observability product: collectors send OTLP telemetry, which is stored locally and queried for exploration, dashboards, agent investigations, and alerts. The README documents the overall shared-query architecture; source excerpts and index references support selected internal relationships. Several implementation details are unsampled, so those links are omitted rather than inferred.
Main entry points: exec.go Query execution · app.tsx React client · service-map.tsx Service map · api.ts Dashboard client API
Components 24
Ingest and storage
- OTLP ingest
internal/ingest/server.go - Parquet telemetry
internal/telemetry/parquet.go - Telemetry repository
internal/telemetry/store/repository.go
Query and analysis
- DuckDB engine
internal/engine/duck.go - Query execution
internal/query/exec.go - PitotQL parser
internal/pitotql/parser.go - Observability service
internal/observability/service.go
Product interfaces
- HTTP API
internal/api/queries.go - React client
ui/host/src/app.tsx - Browser authentication
ui/host/src/auth.tsx - Dashboard client API
ui/host/src/dashboards/api.ts - Dashboard contracts
ui/panels/types.ts - Panel compilation
ui/panels/compile.ts - Panel analysis
ui/panels/analysis.ts - Panel annotations
ui/panels/annotations.ts - Service map
ui/host/src/dashboards/viz/service-map.tsx - Dashboard service
internal/dashboard/service.go
Agents and alerts
- Investigation agent
internal/agent/runtime.go - MCP server
internal/mcp/server.go - Alert evaluation
internal/alert/engine.go - Anomaly detection
internal/intelligence/detector.go
Other components
- OTLP collector
- Browser user
- External MCP client
Connections 21
- OTLP collector → OTLP ingest: sends OTLP
README.md - OTLP ingest → Parquet telemetry: commits telemetry
README.md - Telemetry repository → Parquet telemetry: reads batches
internal/telemetry/store/repository.go - DuckDB engine → Parquet telemetry: queries telemetry
README.md - React client → Browser authentication: gates access
ui/host/src/app.tsx - React client → Dashboard client API: uses dashboard API
ui/host/src/app.tsx - Dashboard client API → Browser authentication: authorizes requests
ui/host/src/dashboards/api.ts - Dashboard client API → Dashboard contracts: uses contracts
ui/host/src/dashboards/api.ts - Service map → Panel compilation: uses compilation
ui/host/src/dashboards/viz/service-map.tsx - Service map → Panel analysis: uses analysis
ui/host/src/dashboards/viz/service-map.tsx - Service map → Panel annotations: uses annotations
ui/host/src/dashboards/viz/service-map.tsx - Browser user → React client: uses interface
README.md - React client → HTTP API: calls API
- HTTP API → Query execution: runs queries
README.md - PitotQL parser → Query execution: supports query language
internal/pitotql/parser.go - Investigation agent → Query execution: investigates telemetry
README.md - MCP server → Query execution: shares query tools
README.md - External MCP client → MCP server: connects over MCP
README.md - Alert evaluation → DuckDB engine: evaluates query results
internal/alert/engine.go - Alert evaluation → Anomaly detection: uses detection
internal/alert/engine.go - Dashboard service → Query execution: validates dashboards
internal/dashboard/service.go