This setup is optimized for personal use:
- keep telemetry ingestion/storage on one local host
- access only web UIs remotely from your MacBook through Tailscale
otel-collector(OTLP receiver + routing)jaeger(trace storage + trace UI)prometheus(metrics storage)grafana(dashboard UI)
Note:
jaegertracing/all-in-onemay print a Jaeger v1 EOL notice. For long-term usage, replace it with Tempo or Jaeger v2.
cd examples/self-host
docker compose up -dCheck health:
docker compose ps
docker compose logs -f otel-collectorIf Grafana dashboard provisioning does not appear immediately:
docker compose restart grafanaLocal UIs on host machine:
- Grafana:
http://127.0.0.1:3789(admin/admin)- first login: change password if prompted
- preloaded dashboards:
Pi OTel / Pi OTel OverviewPi OTel / Pi OTel Ops LivePi OTel / Pi OTel Efficiency & Decision
- provisioned alert rules folder:
Pi OTel Alerts
- Jaeger:
http://127.0.0.1:16686 - Prometheus:
http://127.0.0.1:9090
source examples/self-host/pi-otel.env.exampleThen run Pi with extension and verify:
pi -e ./src/index.ts "/otel-status"
pi -e ./src/index.ts "/otel-open-trace"OTEL_SERVICE_NAME is auto-detected from the nearest project package.json#name (fallback: directory name).
Use manual override only when needed:
# optional
export OTEL_SERVICE_NAME=my-project-nameRecommended: keep docker ports bound to
127.0.0.1(as in this compose file), then expose only via Tailscale.
Run on the host machine (use unused HTTPS ports on your tailnet):
tailscale serve --bg --https=13000 3789
# optional: expose Jaeger too
# tailscale serve --bg --https=13001 16686Check published endpoints:
tailscale serve statusReset serve config:
tailscale serve resetRun on your MacBook:
tailscale ssh -L 3789:127.0.0.1:3789 -L 16686:127.0.0.1:16686 <user>@<host>Then open locally on your MacBook:
http://127.0.0.1:3789(Grafana)http://127.0.0.1:16686(Jaeger)
Provisioned dashboard JSON files:
grafana/dashboards/pi-otel-overview.jsongrafana/dashboards/pi-otel-ops-live.jsongrafana/dashboards/pi-otel-efficiency-decision.json
Provisioned alert rules file:
grafana/provisioning/alerting/pi-otel-alert-rules.yaml
Default alert set:
- Collector down (
up{job="pi-otel-collector"} < 1, 5m) - Tool error rate warning/critical (>5% / >10%, 10m)
- Turn p95 warning/critical (>8s / >12s, 15m)
- Cost-per-turn regression warning (>1.3x vs 7-day baseline, 30m)
Alert rules are provisioned in Grafana, but notification routing (Slack/Email/Webhook) is environment-specific. Configure contact points and policy in Grafana UI after first boot.
This compose file persists storage with docker volumes:
jaeger-dataprometheus-datagrafana-data
Prometheus retention is set to 30d.
Stop services:
docker compose downStop and remove persisted data:
docker compose down -v