pub fn encode_enrich_rules<T: Serialize>(value: &T) -> Result<String>Expand description
Serializes value as JSON, gzips it, and base64-encodes the result for
transport in MATERIALIZE_ENRICH_RULES_HEADER.
The same handful of enrichment rules repeat across nearly every metric, so the JSON is highly compressible. Gzipping keeps the header well under the typical 8-16KB header-size limit even with hundreds of metrics; we then base64-encode because HTTP header values must be printable ASCII.