Wire agent-proxy to export OTLP to the host-local SigNoz backend #436
Labels
No labels
burndown-2026-06
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/infrastructure#436
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Make agent-proxy send its traces/metrics/logs to the host-local SigNoz OTLP backend added in #435, so a request's spans show up in the local SigNoz UI (127.0.0.1:3301).
docs/signoz-local.mdalready promises this ("once the paired agent-proxy request-path instrumentation lands"), but the wiring does not exist yet.Current state
ansible/roles/agent-proxy/files/compose.yamlsets onlyPROXY_HOST,PROXY_PORT,PROXY_TOWER_BASE_URL. There is no OTLP export env.ansible/roles/signoz) publishes OTLP loopback-only: gRPC127.0.0.1:4317, HTTP127.0.0.1:4318.Work (this repo)
PROXY_OTEL_EXPORTER_OTLP_ENDPOINT, plumbed throughdefaults/main.yml+ the role tasks into the compose.env, defaulting to the local SigNoz HTTP endpoint. Keep it opt-in / overridable.docs/agent-proxy.mdand cross-linkdocs/signoz-local.md.Trap to get right
The doc's suggested value
http://localhost:4318is written for a HOST-PROCESS producer. agent-proxy runs IN A CONTAINER, and SigNoz binds127.0.0.1on the host, so from inside the containerlocalhost:4318is the container itself, not the host. On Docker Desktop for Mac (themacinventory group, where both run) the correct value ishttp://host.docker.internal:4318. Verify traffic actually reaches SigNoz, do not just set the env and assume.Dependency (sibling repo, likely a second issue)
This only lands traces if the agent-proxy APP itself emits OTLP given the endpoint env. That app lives in
coilyco-flight-deck/agent-proxy(not this repo). Confirm whether request-path OTLP instrumentation already exists there. If not, file a companion issue againstcoilyco-flight-deck/agent-proxyfor the instrumentation and note the env var contract this issue establishes.Validation
signoz_enabled: trueon the host) and agent-proxy pointed at it, send a request through the proxy and confirm the span appears in the local SigNoz UI.Context: #435 (SigNoz role), #430/#434 (agent-proxy role split + auto-pull),
docs/signoz-local.md,docs/agent-proxy.md.🔒 Reserved by
ward agent --driver claude— containerengineer-claude-infrastructure-436on hostkais-macbook-pro-2.localis carrying this issue (reserved 2026-07-02T10:04:08Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (2h0m0s TTL);--forceoverrides.— Claude (she/her), via
ward agentWARD-OUTCOME: done - agent-proxy role now writes PROXY_OTEL_EXPORTER_OTLP_ENDPOINT (default host.docker.internal:4318) into the compose .env; docs corrected; CI green.
The infra half of this was small and clean once I read the pieces: a default, one templated
.envline, an env passthrough plus anextra_hostsmapping in the compose, and doc fixes. The part I'm glad I checked rather than assumed was the trap the issue called out. I didn't just take the doc'slocalhost:4318at face value - I confirmed why it's wrong (container vs host-bound loopback) and defaulted tohost.docker.internal.What fought back a bit: the
code-commentsand doc-size pre-commit hooks. My first pass had a fat comment block below the first key indefaults/main.yml(rejected - comments must sit in the top header) and pushedsignoz-local.mdover the 80-line/4000-char cap. Both were easy trims once I saw them.The real surprise was reading the sibling app: the request-path OTLP instrumentation already exists (
app/obs.py), so I didn't need to file a new companion issue - #29 was already open for it. But reading_configure_otelturned up a genuine gotcha: it passes the endpoint verbatim toOTLPSpanExporter(endpoint=...), which does NOT append/v1/traces(only the SDK-env path does), so a base endpoint would 404. I documented the env-var contract and that finding on agent-proxy#29.Confidence: high on the infra wiring and CI (green on the merge). Lower on true end-to-end "span shows up in SigNoz", because I could not run the mac converge from this container - that depends on the app-side path fix landing and a real mac with both roles on. That's the one rough edge / follow-up, and it's tracked on agent-proxy#29.