Documentation
¶
Overview ¶
Package convert translates the framework's in-process observability events into proto messages on the wire. It is the only place in the agent that knows about both data shapes; the connection and stream layers operate on proto types only, the bus layer operates on Go types only.
Conversion is allocation-aware: it reuses the destination proto message when possible (for repeated emissions on the same stream) but does not pool the proto messages — Connect-RPC retains references to sent messages until they're serialized, and the contract for sync.Pool requires single-owner semantics that we cannot guarantee at the wire boundary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventToProto ¶
func EventToProto(in observability.Event) *adminv1.Event
EventToProto converts an in-process observability.Event to a proto adminv1.Event. The returned message is a fresh allocation; the input is untouched (the caller still owns it and must Release it).
Returns nil if the event kind is unknown — the agent should never see such an event, but the safe behaviour is to drop rather than crash.
func FilterFromProto ¶
func FilterFromProto(in *adminv1.Filter) observability.Filter
FilterFromProto translates a proto Filter (the Subscribe payload) to an in-process observability.Filter. NodeIDs and Kinds are propagated; the HTTP/SQL-specific dimensions are forwarded via SubscriptionFilter to the stream layer (because the bus's Filter is intentionally narrow).
func KindFromProto ¶
func KindFromProto(et adminv1.EventType) observability.EventKind
KindFromProto maps a proto event type back to the in-process EventKind. Returns KindUnknown for unrecognised values.
func KindToProto ¶
func KindToProto(k observability.EventKind) adminv1.EventType
KindToProto maps an in-process EventKind to its proto enum.
Types ¶
This section is empty.