A local, FOSS-first statistical observability runtime over Grafana, R (webR), Monaco, SQLite, and gcx.
Architectural Commitment: Grafana is authoritative observational storage. Observatory is a local analytical runtime over Grafana. R is the durable statistical language. TypeScript orchestrates execution, UI, automation, and persistence.
- Grafana Gateway (
@observatory/gcx-adapter):- Whitelisted
gcxsubprocess adapter (child_process.spawnargument arrays only — zero shell interpolation, zero credential-logging flags, zero Grafana credentials in browser JS). - Built-in Demo Mode simulating a realistic multi-service checkout autoscaling scenario (request surge, CPU saturation, queue depth buildup, HPA
#scale-upevents, and latency recovery) so the platform works immediately without Grafana credentials.
- Whitelisted
- Pushdown Query Planner (
@observatory/query-planner):- Compiles lazy R expression ASTs into PromQL / TraceQL pushdown queries (filtering,
rate(),delta(),#tagresolution) while keeping rich statistical ops local in browserwebR. - Emits Semantic Statistical Diagnostics (e.g., warning when applying
mean()to a cumulative counter withoutrate()).
- Compiles lazy R expression ASTs into PromQL / TraceQL pushdown queries (filtering,
- Browser
webR+observatoryR Package (r/):- Real browser-side R execution via
webRwith nativewebr::canvas()plotting (plot(),hist(),acf()). - First-class
c("world_frame", "data.frame")andtagged_statisticS3 objects preserving tags & provenance. - v1 R API:
metrics(),traces(),events(),where(),by(),rate(),delta(),since(),around(),collect(),register(),baseline(),anomaly(),trend(),quantile_exceedance(),zscore(),change_point(),correlate(),summarize(),monitor(),alert().
- Real browser-side R execution via
- Monaco R Workspace & Dependency DAG:
- Stable virtual URIs (
observatory:///analysis/...), semantic autocomplete for#tags, catalog metrics, and R functions, rich TagGraph hover tooltips,Ctrl+Enter/Shift+Enterexecution, and an interactive Expression Dependency DAG. - Git-friendly durable files under
observatory/paired with Node 22 built-in SQLite (node:sqlite) for runtime state, registers, monitor runs, alerts, and provenance logs.
- Stable virtual URIs (
- Interactive Dashboards, Monitors & Event-Relative Forensics:
- Synchronized cross-chart hover and click-drag interval brushing ("Analyze interval", "Find correlated", "Create monitor").
- Scheduled monitors separating detection ≠ notification, with True/False Positive calibration (
summary(monitor)) and a local Alert Inbox. - Event-relative alignment (
P(Δmetric(τ) | event)around#scale-up,#deploy, etc.).
npm install
npm run dev- Web UI:
http://127.0.0.1:5173 - Node Runtime API:
http://127.0.0.1:4173
npm run build
npm test