Skip to content

observability: built-in OpenTelemetry Collector (Consul SD → OTLP) - #24

Merged
pipozzz merged 1 commit into
mainfrom
feat/otel-collector
Oct 8, 2026
Merged

pipozzz merged 1 commit into
mainfrom
feat/otel-collector

Conversation

@pipozzz

@pipozzz pipozzz commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

What

A built-in OpenTelemetry Collector subsystem: a managed Nomad job that discovers services via Consul service discovery, scrapes their Prometheus metrics, and ships them to a configurable OTLP backend (SigNoz, Grafana/Tempo/Mimir, Honeycomb, …). This is the general app-metrics layer on top of the existing LB metrics + Nomad CPU/mem telemetry.

How

  • setup/otel-collector.ts: on-disk config ({enabled, otlpEndpoint, otlpHeaders, scrapeIntervalSeconds}); generates the collector config (prometheus receiver with consul_sd_configs against the hub Consul 10.10.0.1:8500 → OTLP exporter) and a count=1 Nomad service job that reschedules forever (survives a node death, restarts elsewhere). deployOtelCollector() / stopOtelCollector() mirror the HA-Traefik subsystem.
  • Discovery/scrape: keeps the Traefik instances (:8082) + any service tagged nomploy.metrics.port=<port> (per-service opt-in via a Consul tag).
  • settings router: getObservability / saveObservability (adminProcedure; enable → deploy, disable → purge; audited).
  • UI: Settings → Web Server → Observability card (enable, OTLP endpoint, headers e.g. SigNoz ingestion key, scrape interval).

Scope / caveats (v1)

  • Metrics only (Prometheus→OTLP). Traces/logs + app auto-instrumentation are a later step.
  • Cross-node scraping works for host-networked services (reached at node IPs, e.g. Traefik). Bridge/CNI services expose alloc IPs that aren't cross-node routable on this cluster, so a bridge app on another node isn't scrapable until co-located (or the mesh/CNI routing fix lands).
  • OTLP exporter is gRPC (otlp); point it at SigNoz :443/:4317. (otlphttp/4318 is a later toggle.)

Validation

scripts/check.sh green (server prod build, 529 tests, app-tsc unchanged / 8 pre-existing). Not yet live-tested — recommend merging, rolling, then enabling it in Settings with an OTLP endpoint and confirming the collector job runs + scrapes Traefik.

…OTLP)

A managed OTel Collector that discovers services via Consul and ships their
Prometheus metrics to a configurable OTLP backend (SigNoz/Grafana/etc.) — the
general app-metrics layer on top of the LB/Nomad metrics.

- setup/otel-collector.ts: on-disk config ({enabled, otlpEndpoint, otlpHeaders,
  scrapeIntervalSeconds}); generates the collector's prometheus receiver
  (consul_sd_configs against the hub Consul 10.10.0.1:8500 — keeps the Traefik
  instances on :8082 and any service tagged nomploy.metrics.port=<port>) → OTLP
  exporter; deploy/stop as a count=1 Nomad service job that reschedules forever
  (survives a node death, restarts elsewhere). Mirrors the HA-Traefik subsystem.
- settings router: getObservability / saveObservability (adminProcedure; save
  deploys when enabled, purges when disabled; audited).
- Settings → Web Server: new Observability card (enable, OTLP endpoint, headers,
  scrape interval).

Caveat: cross-node scraping works for host-networked services (node IPs);
bridge/CNI alloc IPs aren't cross-node routable here, so those must be
co-located until the mesh/CNI routing fix lands.
@pipozzz
pipozzz merged commit 7526374 into main Oct 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant