Envelope transport library
The Envelope struct has a required message field and a trace_carrier field that defaults to an empty list. The wrap function injects the active context into the carrier with the OpenTelemetry text-map propagator. The handle function wraps plain messages in an envelope with no metadata, so old senders still work. It rebuilds the struct so fields missing in older versions get defaults.
It then extracts the context, runs the handler, and detaches the context. Drop-in call and cast functions wrap GenServer.call, with a default timeout of 5000 ms, and GenServer.cast. Old and new message formats can coexist, so services upgrade node by node.