1 Commits
Author SHA1 Message Date
Hanzo AI b78c90d90a exporter: Type=ZAP is now ZAP-native by default (no protobuf, no OTLP)
Previously Type=ZAP was OTLP/HTTP+protobuf misnamed, gated behind
-tags otlp. Per the project rule (ZAP internal, ZIP edge) the ZAP
exporter should be ZAP-native by default — no build tag required,
no protobuf in the dep graph.

Layout:
  - exporter_zap.go (no tag, default): true ZAP-native span exporter.
    Spans → JSON → ZAP envelope (MsgSpanBatch) → TCP → hanzo/o11y
    zapreceiver. Implements sdktrace.SpanExporter, uses luxfi/zap.Node
    for transport. Best-effort connect; reconnect on send failure;
    fire-and-forget (no response wait).
  - exporter_otlp.go (//go:build !grpc && otlp): the old 'exporter_zap.go'
    body, renamed to its true identity. OTLP/HTTP+protobuf,
    opt-in via -tags otlp for callers that need a real OTLP collector.
  - exporter_grpc.go (//go:build grpc): legacy OTLP/gRPC, unchanged.
  - exporter_noop.go (//go:build !grpc && !otlp): newExporter for
    untagged builds when Type ∈ {HTTP, GRPC}; Type=ZAP and
    Type=Disabled never reach this path (tracer.go dispatches first).

tracer.go: New() now dispatches Type=ZAP directly to
newZAPNativeExporter, passing appName + version through to the
ZAP envelope. Falls through to newExporter for the other types.

zap_native_test.go: round-trip — exporter ships a span over the
wire to a stand-in zap.Node receiver and the JSON payload parses
to the expected appName + span name.

Default-tag dep audit (no protobuf, no OTLP, no gRPC):
    go list -deps ./... | grep -E 'protobuf|otlp|grpc-gateway|^google.golang.org/grpc$'
    → (empty)
2026-05-21 00:44:42 -07:00