Maple: An Open-Source Observability Platform Built on OpenTelemetry and ClickHouse
Maple is an open-source observability platform for traces, logs, and metrics, built on OpenTelemetry and ClickHouse. It features an OTLP ingest gateway with key-based auth, a chat agent, alert evaluation, and SQLite/Turso-backed dashboard persistence. The monorepo ships with Clerk or self-hosted auth modes and a full suite of CI/CD workflows for Cloudflare Workers, targeting teams that want to own their observability stack in a TypeScript-native codebase.
Maple is a fully open-source observability platform purpose-built on OpenTelemetry (OTel) and ClickHouse. It ingests traces, logs, and metrics via the OTLP protocol, then visualizes and analyzes them in a modern Single Page Application (SPA). The project is ideal for teams that want to self-host or deploy on the edge (Cloudflare Workers) without being locked into proprietary observability vendors like Datadog or Grafana Cloud.
Maple 是一个完全开源的可观测性平台,从底层为 OpenTelemetry 和 ClickHouse 设计。它通过 OTLP 协议接收 traces、logs 和 metrics,并在一个现代化 SPA 前端中做可视化和分析。项目适合那些希望自建或部署在边缘侧(Cloudflare Workers)、同时又不想被 Datadog 或 Grafana Cloud 等专有可观测性方案锁定的团队。
Existing open-source stacks like Grafana + Loki + Tempo + Mimir are powerful but expensive to operate and complex to configure. Managed clouds are simpler but costly per GB. Maple addresses this by providing a single, cohesive monorepo that includes an OTLP ingest gateway, a query engine, alerting, and a polished UI—all deployable via Docker Compose or Cloudflare Workers. It reduces the cognitive load of wiring together multiple databases and APIs.
现有的开源方案如 Grafana + Loki + Tempo + Mimir 能力虽强,但运维成本高、配置复杂;托管云服务则简单但按量计费昂贵。Maple 的解决思路是提供一个统一的单体仓库(monorepo),其中包含 OTLP 摄取网关、查询引擎、告警和精良的 UI——既能通过 Docker Compose 本地启动,也能部署到 Cloudflare Workers。它免去了你拼接多个数据库和 API 的心智负担。
Maple comprises several key apps in a monorepo. apps/ingest is an OTLP gateway that authenticates using per-org ingest keys (HMAC + encryption), enriches data with org context, and forwards it to an OpenTelemetry Collector. apps/api serves an Effect-based HTTP API that proxies queries to ClickHouse (or Tinybird) and manages dashboards via SQLite/Turso. apps/web is a TanStack Router SPA for the dashboard. apps/alerting evaluates alert rules on a schedule. All apps share domain types and a query engine from packages/domain and packages/query-engine.
Maple 的 monorepo 中包含多个核心应用。apps/ingest 是 OTLP 摄取网关,使用组织级别的 ingest key(HMAC + 加密)做认证,补充组织上下文后转发给 OTEL Collector。apps/api 是一个基于 Effect 的 HTTP API,负责代理查询到 ClickHouse(或 Tinybird),并通过 SQLite/Turso 管理仪表盘。apps/web 是 TanStack Router 构建的 SPA 仪表盘前端。apps/alerting 按计划评估告警规则。所有应用共享来自 packages/domain 和 packages/query-engine 的领域类型和查询引擎。
Maple supports two authentication modes via MAPLE_AUTH_MODE. clerk mode integrates with Clerk for multi-tenant SaaS setups. self_hosted mode uses a single root password for single-tenant deployments. Dashboards and settings are persisted in a local SQLite file (or Turso cloud). Persistence is optional but recommended for retaining custom dashboards across restarts. In self-hosted mode, a persistent volume for apps/api/.data is sufficient.
Maple 通过环境变量 MAPLE_AUTH_MODE 支持两种认证模式。clerk 模式对接 Clerk 服务,适合多租户 SaaS 场景;self_hosted 模式使用单一 root 密码登录,适合单租户自部署。仪表盘和设置保存在本地 SQLite 文件(或 Turso 云)中,虽然不是必需,但建议启用持久化,以便在容器或进程重启后保留自定义仪表盘。在自托管模式下,挂载 apps/api/.data 目录作为数据卷即可。
To run Maple locally, ensure Bun >= 1.3, install dependencies (bun install), and run docker compose -f docker-compose.yml up --build. This starts the API, web UI, ingest gateway, and an OpenTelemetry Collector. For Cloudflare Worker deployment, the project uses Alchemy: bun run alchemy:deploy:stg for staging, bun run alchemy:deploy:prd for production. PR previews are automatically created and destroyed by CI. Secrets are managed via Doppler.
本地运行 Maple 需要 Bun >= 1.3。安装依赖后(bun install),执行 docker compose -f docker-compose.yml up --build 即可启动 API、Web UI、摄取网关和 OTEL Collector 全套服务。如果需要部署到 Cloudflare Workers,项目使用 Alchemy 工具链:bun run alchemy:deploy:stg 部署测试环境,bun run alchemy:deploy:prd 部署生产环境。PR 预览环境由 CI 自动创建和销毁,密钥通过 Doppler 统一管理。
Maple is well-suited for small to mid-sized teams that want full control over their observability pipeline, especially those already using OpenTelemetry. It is also a strong choice for edge-deployed applications on Cloudflare Workers. Current limitations: multi-tenant self-hosted mode (JWT/API key) was removed in favor of simpler single-tenant self-hosted mode. The project is under active development; documentation is still evolving. It requires familiarity with ClickHouse and OpenTelemetry for production tuning.
Maple 非常适合中小型团队,尤其是那些已经在用 OpenTelemetry、又想完全掌控可观测性管道的团队。对于部署在 Cloudflare Workers 上的边缘应用,Maple 也是很有吸引力的选择。当前的边界:自托管多租户模式(JWT/API key)已被移除,取而代之的是更简单的单租户密码模式。项目正处于活跃开发阶段,文档尚在完善中。要在生产环境中调优,需要熟悉 ClickHouse 和 OpenTelemetry。