mirror of
https://github.com/JackChen-me/open-multi-agent.git
synced 2026-10-21 10:40:12 -05:00
Every observability example used an in-process exporter, which proves the adapter's semantics but never serializes a span or opens a socket. Nothing in the repository showed the path an OpenTelemetry user actually takes, so the exporter choice, Resource, auth headers, and shutdown order were left for each reader to reconstruct. `otlp-backend.ts` runs OTel SDK to OTLP/HTTP exporter to HTTP to a backend, and prints what crossed the wire. The backend is a loopback listener the example starts itself, so it still needs no API key, no external collector, and no internet access; `OTLP_URL` and `OTLP_HEADERS` redirect the same payload to a hosted vendor. It also demonstrates two things that are easy to get wrong. `service.name` belongs to the provider's Resource, and a provider built without one files every span under `unknown_service:node`. Tool input and output require both halves of the capture opt-in, so the example sets the core policy and the adapter mode together and states what the run exports without them. `runToolDemo` joins the shared demo runtime so the example can show a real `execute_tool` span; the existing `runDemo` export is unchanged. The example is registered in the catalog and in the smoke script, which now runs eight examples.