pub fn scrub_ipv4(ip: Ipv4Addr) -> &'static str
Expand description
Scrub an IPv4 address.
Allow well-known IPs like loopback, and fully scrub out all other IPs. Returns the scrubbed value as a string.
ยงExamples
use std::net::Ipv4Addr;
use relay_event_normalization::span::description::{scrub_ipv4};
assert_eq!(scrub_ipv4(Ipv4Addr::LOCALHOST), "127.0.0.1");
assert_eq!(scrub_ipv4(Ipv4Addr::new(8, 8, 8, 8)), "*.*.*.*");