Skip to main content

relay_event_normalization/normalize/span/
mod.rs

1//! Span normalization logic.
2
3use regex::Regex;
4use std::sync::LazyLock;
5
6pub mod ai;
7pub mod country_subregion;
8pub mod description;
9pub mod exclusive_time;
10pub mod tag_extraction;
11
12/// Regex used to scrub hex IDs and multi-digit numbers from table names and other identifiers.
13pub static TABLE_NAME_REGEX: LazyLock<Regex> = LazyLock::new(|| {
14    Regex::new(
15        r"(?ix)
16        [0-9a-f]{8}_[0-9a-f]{4}_[0-9a-f]{4}_[0-9a-f]{4}_[0-9a-f]{12} |
17        [0-9a-f]{8,} |
18        \d\d+
19        ",
20    )
21    .unwrap()
22});