mirror of
https://github.com/hanzoai/otel-collector.git
synced 2026-11-03 02:20:04 +00:00
* 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]>
19 lines
487 B
Go
19 lines
487 B
Go
package zapreceiver
|
|
|
|
import "errors"
|
|
|
|
// Config configures the ZAP-native OTLP receiver.
|
|
type Config struct {
|
|
// Endpoint is the host:port the ZAP-HTTP listener binds. The wire is ZAP
|
|
// frames (zap-proto/http), NOT OTLP-HTTP/gRPC. Default "0.0.0.0:4319".
|
|
Endpoint string `mapstructure:"endpoint"`
|
|
}
|
|
|
|
// Validate implements component.ConfigValidator.
|
|
func (c *Config) Validate() error {
|
|
if c.Endpoint == "" {
|
|
return errors.New("zapreceiver: endpoint must be set")
|
|
}
|
|
return nil
|
|
}
|