Skip to content

3a: Add Attachment wire type to trapfall-proto #244

Description

@ajianaz

Parent: #233 · Blocked by: #235

Scope

Add Attachment struct to trapfall-proto/src/lib.rs and extend ParsedEnvelope.

Struct to Add

pub struct Attachment {
    pub filename: String,
    pub content_type: Option<String>,        // "image/png"
    pub attachment_type: Option<String>,     // "event.attachment" (default)
    pub data: Vec<u8>,                       // raw binary bytes
}

Extend ParsedEnvelope

pub struct ParsedEnvelope {
    pub events: Vec<Event>,
    pub transactions: Vec<Transaction>,
    pub session_updates: Vec<SessionUpdate>,
    pub session_aggregates: Vec<SessionAggregates>,
    pub attachments: Vec<Attachment>,         // NEW
}

Tasks

  • Add Attachment struct
  • Extend ParsedEnvelope with attachments field
  • Unit test: create Attachment with binary data, verify fields
  • Note: Attachment does NOT derive Serialize/Deserialize for the data field via serde_json — handle serialization separately (base64 for storage)

Effort: ~30 minutes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestscope:prototrapfall-proto wire typestype:envelopeSentry envelope item type expansion

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions