relay_event_normalization/
lib.rs

1//! Event normalization and processing.
2
3#![warn(missing_docs)]
4#![doc(
5    html_logo_url = "https://raw.githubusercontent.com/getsentry/relay/master/artwork/relay-icon.png",
6    html_favicon_url = "https://raw.githubusercontent.com/getsentry/relay/master/artwork/relay-icon.png"
7)]
8
9mod clock_drift;
10pub mod eap;
11mod event;
12mod event_error;
13mod geo;
14mod legacy;
15mod logentry;
16mod mechanism;
17mod normalize;
18mod regexes;
19mod remove_other;
20mod schema;
21mod stacktrace;
22mod statsd;
23mod timestamp;
24mod transactions;
25mod trimming;
26mod validation;
27
28pub use validation::{EventValidationConfig, validate_event, validate_span};
29pub mod replay;
30pub use event::{
31    NormalizationConfig, normalize_event, normalize_measurements, normalize_performance_score,
32};
33pub use normalize::breakdowns::*;
34pub use normalize::*;
35pub use remove_other::RemoveOtherProcessor;
36pub use schema::SchemaProcessor;
37pub use timestamp::TimestampProcessor;
38pub use transactions::*;
39pub use trimming::TrimmingProcessor;
40pub use user_agent::*;
41
42pub use self::clock_drift::*;
43pub use self::geo::*;
44
45pub use sentry_release_parser::{validate_environment, validate_release};
46
47/// Maximum number of characters allowed for a field value.
48///
49/// Must be aligned with the `max_chars` field in the metastructure of the
50/// payload's attribute.
51enum MaxChars {
52    TagKey,
53    TagValue,
54    Distribution,
55    Logger,
56}
57
58impl MaxChars {
59    pub fn limit(self) -> usize {
60        match self {
61            Self::TagKey => 200,
62            Self::TagValue => 200,
63            Self::Distribution => 64,
64            Self::Logger => 64,
65        }
66    }
67}