docs(bd-ch6.3): document production OTLP/HTTP deployment in README

Enable OTLP receivers in fabric-web.service by adding --otlp-http :4318,
configure NEEDLE otlp_metric_sink, and document the deployed config.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-04-23 20:59:50 -04:00
parent 8d1af46705
commit a0cd3934f5

View file

@ -171,6 +171,25 @@ fabric logs --worker tcb-a --otlp-grpc :4317
Everything stays on your machine — FABRIC is a local collector, not a third-party service. Telemetry is read-only: FABRIC ingests spans/logs/metrics for display but never writes back to NEEDLE or modifies worker state.
## Production Deployment
FABRIC runs as a user-level systemd service (`fabric-web.service`) with OTLP/HTTP enabled:
```bash
# Service status
systemctl --user status fabric-web.service
# Verify OTLP listener
ss -tlnp | grep 4318
```
| Component | Port | Purpose |
|-----------|------|---------|
| Web dashboard | `:3000` | Browser UI + REST API |
| OTLP/HTTP | `:4318` | NEEDLE metric ingestion |
NEEDLE's `otlp_metric_sink` is enabled in `~/.needle/config.yaml`, pushing aggregated token/cost/bead metrics to `http://localhost:4318/v1/metrics`. FABRIC deduplicates these against JSONL-tailed events and writes them to `~/.needle/fabric.db` with `metrics_source='otlp-metric'`.
🚧 **In Development** - See [docs/plan.md](docs/plan.md) for implementation roadmap.
## Documentation