relay_event_schema/protocol/
trace_attachment.rs1use relay_protocol::{Annotated, Empty, FromValue, IntoValue, Object, Value};
2
3use crate::processor::ProcessValue;
4use crate::protocol::{Attributes, Timestamp, TraceId};
5
6use uuid::Uuid;
7
8#[derive(Clone, Debug, Default, PartialEq, Empty, FromValue, IntoValue, ProcessValue)]
10pub struct TraceAttachmentMeta {
11 #[metastructure(required = true, nonempty = true, trim = false)]
13 pub trace_id: Annotated<TraceId>,
14
15 #[metastructure(required = true, nonempty = true, trim = false)]
17 pub attachment_id: Annotated<Uuid>,
18
19 #[metastructure(required = true, trim = false)]
21 pub timestamp: Annotated<Timestamp>,
22
23 #[metastructure(pii = "true", max_chars = 256, max_chars_allowance = 40, trim = false)]
25 pub filename: Annotated<String>,
26
27 #[metastructure(required = true, max_chars = 128, trim = false)]
29 pub content_type: Annotated<String>,
30
31 #[metastructure(pii = "maybe")]
33 pub attributes: Annotated<Attributes>,
34
35 #[metastructure(additional_properties, pii = "maybe")]
37 pub other: Object<Value>,
38}