relay_event_normalization/normalize/span/description/
resource.rs

1//! Code for scrubbing resource span description.
2use std::collections::BTreeSet;
3
4use once_cell::sync::Lazy;
5
6// TODO: move functions from parent module here.
7
8/// Parts of a resource path that we allowlist.
9///
10/// By default, all path segments except the last are dropped.
11pub static COMMON_PATH_SEGMENTS: Lazy<BTreeSet<&str>> = Lazy::new(|| {
12    BTreeSet::from([
13        "_app",
14        "_next",
15        "_nuxt",
16        "_shared",
17        ".vite",
18        "active_storage",
19        "ajax",
20        "assets",
21        "avatar",
22        "build",
23        "cdn",
24        "chunks",
25        "coins",
26        "data",
27        "deps",
28        "dist",
29        "dms",
30        "files",
31        "icons",
32        "image",
33        "images",
34        "img",
35        "immutable",
36        "js",
37        "lib",
38        "libs",
39        "media",
40        "node_modules",
41        "products",
42        "profile_images",
43        "rails",
44        "redirect",
45        "releases",
46        "representations",
47        "shop",
48        "static",
49        "svg",
50        "twemoji",
51        "vi",
52        "video",
53        "webfonts",
54        "webpack",
55        "wl-image",
56        "wp-includes",
57    ])
58});