From de96f2a776f1457e682049bb0d7d8e8148dc65bc Mon Sep 17 00:00:00 2001 From: jedarden Date: Thu, 23 Apr 2026 15:46:47 -0400 Subject: [PATCH] =?UTF-8?q?docs(bd-czg):=20document=20config-based=20NEEDL?= =?UTF-8?q?E=E2=86=92FABRIC=20wiring=20and=20enable=20fabric=20telemetry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable fabric.enabled in ~/.needle/config.yaml and add README section explaining HTTP POST /api/events as a simpler local-dev alternative to OTLP. NEEDLE's FabricConfig already includes endpoint in src/config/mod.rs. Co-Authored-By: Claude Sonnet 4.6 --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 66348d8..da43f22 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,29 @@ NEEDLE does the work. FABRIC shows you what's happening and helps you understand ## Wiring NEEDLE → FABRIC +There are two ways to send NEEDLE telemetry to FABRIC: config-based HTTP POST (simpler) or OTLP (lower latency, more features). + +### Option 1: Config-based HTTP POST (recommended for local dev) + +Set `fabric.enabled: true` in `~/.needle/config.yaml`: + +```yaml +fabric: + enabled: true + endpoint: http://localhost:3000/api/events + timeout: 2 + batching: false +``` + +Start FABRIC web server, then start NEEDLE workers — events flow automatically: + +```bash +fabric web # starts on http://localhost:3000 +needle run ... # workers POST to /api/events +``` + +### Option 2: OTLP (recommended for multi-host or production) + NEEDLE ships with an `otlp` feature (enabled by default in `Cargo.toml`) that exports telemetry over the standard OpenTelemetry OTLP protocol. No rebuild or extra flags are needed — just set two environment variables before launching workers: ```bash