zaptrace

package
v1.801.157 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package zaptrace is a ZAP-native OTel trace transport: an otlptrace.Client whose wire is Hanzo's ZAP transport (github.com/zap-proto/http). Spans are marshaled as standard OTLP protobuf but shipped over the ZAP wire (capnp frames, X-Wing PQ-KEM handshake), NEVER OTLP-over-HTTP(:4318) or OTLP-over-gRPC(:4317). The collector's zapreceiver (:4319) terminates it and writes to hanzoai/datastore.

The ExportTraceServiceRequest envelope is hand-encoded from the grpc-free trace messages (see UploadTraces) rather than the generated collector/trace/v1 request type, whose sibling gRPC service stubs (trace_service_grpc.pb.go, no build tag) would pull google.golang.org/grpc into the module graph. Hanzo services speak ZAP/HTTP/WS, never gRPC — do NOT "simplify" this back to coltrace.ExportTraceServiceRequest.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements go.opentelemetry.io/otel/exporters/otlp/otlptrace.Client.

func New

func New(endpoint string) *Client

New returns an otlptrace.Client that ships spans over the ZAP wire to endpoint (host:port of a collector's ZAP receiver, e.g. otel-collector.hanzo.svc:4319).

func (*Client) Start

func (c *Client) Start(context.Context) error

Start opens the pooled ZAP transport (connects lazily on first upload).

func (*Client) Stop

func (c *Client) Stop(context.Context) error

Stop closes idle ZAP connections.

func (*Client) UploadTraces

func (c *Client) UploadTraces(_ context.Context, protoSpans []*tracepb.ResourceSpans) error

UploadTraces ships one OTLP ExportTraceServiceRequest over the ZAP wire.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL