Skip to content

Commit

Permalink
set max 20MB size for recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
frankh committed Aug 20, 2024
1 parent 1d5e83e commit f0998a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rust/capture/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use crate::prometheus::{setup_metrics_recorder, track_metrics};

const EVENT_BODY_SIZE: usize = 2 * 1024 * 1024; // 2MB
const BATCH_BODY_SIZE: usize = 20 * 1024 * 1024; // 20MB, up from the default 2MB used for normal event payloads
const RECORDING_BODY_SIZE: usize = 20 * 1024 * 1024; // 20MB, up from the default 2MB used for normal event payloads

#[derive(Clone)]
pub struct State {
Expand Down Expand Up @@ -120,7 +121,8 @@ pub fn router<
post(v0_endpoint::recording)
.get(v0_endpoint::recording)
.options(v0_endpoint::options),
);
)
.layer(DefaultBodyLimit::max(RECORDING_BODY_SIZE));

let router = match capture_mode {
CaptureMode::Events => Router::new().merge(batch_router).merge(event_router),
Expand Down

0 comments on commit f0998a9

Please sign in to comment.