relay_event_normalization/normalize/span/description/
resource.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Code for scrubbing resource span description.
use std::collections::BTreeSet;

use once_cell::sync::Lazy;

// TODO: move functions from parent module here.

/// Parts of a resource path that we allowlist.
///
/// By default, all path segments except the last are dropped.
pub static COMMON_PATH_SEGMENTS: Lazy<BTreeSet<&str>> = Lazy::new(|| {
    BTreeSet::from([
        "_app",
        "_next",
        "_nuxt",
        "_shared",
        ".vite",
        "active_storage",
        "ajax",
        "assets",
        "avatar",
        "build",
        "cdn",
        "chunks",
        "coins",
        "data",
        "deps",
        "dist",
        "dms",
        "files",
        "icons",
        "image",
        "images",
        "img",
        "immutable",
        "js",
        "lib",
        "libs",
        "media",
        "node_modules",
        "products",
        "profile_images",
        "rails",
        "redirect",
        "releases",
        "representations",
        "shop",
        "static",
        "svg",
        "twemoji",
        "vi",
        "video",
        "webfonts",
        "webpack",
        "wl-image",
        "wp-includes",
    ])
});