Files
68ce98920a feat(zap): native ZAP-transport OTLP receiver + exporter (#4)
* feat(zap): native ZAP-transport OTLP receiver + exporter

Adds ZAP-native telemetry ingestion/forwarding over github.com/zap-proto/http
(the Hanzo ZAP wire — capnp frames, X-Wing PQ-KEM handshake), NOT OTLP-HTTP
(:4318) or OTLP-gRPC (:4317). The payload stays standard OTLP protobuf so full
OTel fidelity + pipeline interop are preserved; only the transport is ZAP.

- receiver/zapreceiver: runs a zaphttp.Server on :4319, terminates OTLP over
  the ZAP wire on /v1/{traces,logs,metrics}, decodes to pdata, pushes to the
  pipeline (-> ClickHouse exporters -> hanzoai/datastore). ObsReport transport
  label is "zap". One listener serves all three signals.
- exporter/zapexporter: pdata -> OTLP proto -> zaphttp POST to a peer collector's
  ZAP receiver (used by the filelog log-agent to ship node logs over ZAP).
- Registered in components.go alongside otlpreceiver (OTLP retained as an
  interop endpoint for third-party SDKs).

Tests: TestZapReceiverAllSignals (traces+logs+metrics e2e over the real ZAP
wire) and TestExportTracesOverZAP both green; full ./components build clean.

* build(zap): self-building multi-stage Dockerfile for in-cluster Kaniko/BuildKit

The default Dockerfile COPYs a CI-prebuilt binary; this compiles in-image so an
in-cluster BuildKit/Kaniko job (platform.hanzo.ai) can produce the ZAP-enabled
image without the (currently broken) GitHub reusable workflow.

---------

Co-authored-by: hanzo-dev <[email protected]>
2026-07-03 14:56:33 -07:00

17 lines
940 B
Go

// Package zapreceiver ingests OpenTelemetry signals (traces, logs, metrics)
// carried over Hanzo's native ZAP transport (github.com/zap-proto/http) rather
// than OTLP-over-HTTP (:4318) or OTLP-over-gRPC (:4317).
//
// The wire is pure ZAP: each request/response is one ZAP frame over the
// zap-proto/http length-prefixed transport (X-Wing PQ-KEM handshake at the
// transport layer, per the zap-proto spec) — there is no net/http and no gRPC
// in the path. The PAYLOAD is standard OTLP protobuf/JSON (the OpenTelemetry
// data model), so full OTLP fidelity and pipeline interop are preserved while
// the transport is ZAP-native.
//
// This is the canonical transport Hanzo's own services (cloud, gateway,
// agents, the filelog log-agent) use to ship telemetry into the one
// hanzoai/datastore. Standard OTLP receivers remain available on the same
// collector as an interop endpoint for third-party OTel SDKs.
package zapreceiver