relay_server/constants.rs
1#[cfg(feature = "processing")]
2use std::time::Duration;
3
4include!(concat!(env!("OUT_DIR"), "/constants.gen.rs"));
5
6/// Name of the event attachment.
7///
8/// This is a special attachment that can contain a sentry event payload encoded as message pack.
9pub const ITEM_NAME_EVENT: &str = "__sentry-event";
10
11/// Name of the breadcrumb attachment (1).
12///
13/// This is a special attachment that can contain breadcrumbs encoded as message pack. There can be
14/// two attachments that the SDK may use as swappable buffers. Both attachments will be merged and
15/// truncated to the maxmimum number of allowed attachments.
16pub const ITEM_NAME_BREADCRUMBS1: &str = "__sentry-breadcrumb1";
17
18/// Name of the breadcrumb attachment (2).
19///
20/// This is a special attachment that can contain breadcrumbs encoded as message pack. There can be
21/// two attachments that the SDK may use as swappable buffers. Both attachments will be merged and
22/// truncated to the maxmimum number of allowed attachments.
23pub const ITEM_NAME_BREADCRUMBS2: &str = "__sentry-breadcrumb2";
24
25/// Envelope header used to store the UE4 user id.
26pub const UNREAL_USER_HEADER: &str = "unreal_user_id";
27
28/// The default retention for events if the server does not specify a value in project
29/// configurations.
30pub const DEFAULT_EVENT_RETENTION: u16 = 90;
31
32/// Maximum size of JSON request bodies.
33pub const MAX_JSON_SIZE: usize = 262_144;
34
35/// The default client used for check ins whenever the incoming request has no client set.
36pub const DEFAULT_CHECK_IN_CLIENT: &str = "relay-http";
37
38/// The default retention for attachment, which defaults to 30 days currently.
39#[cfg(feature = "processing")]
40pub const DEFAULT_ATTACHMENT_RETENTION: Duration = Duration::from_hours(24 * 30);