@@ -8,7 +8,6 @@ use crate::services::outcome::DiscardReason;
88use crate :: services:: processor:: { ProcessingError , ReplayGroup , should_filter} ;
99use crate :: services:: projects:: project:: ProjectInfo ;
1010use crate :: statsd:: { RelayCounters , RelayTimers } ;
11- use crate :: utils:: sample;
1211
1312use bytes:: Bytes ;
1413use relay_base_schema:: organization:: OrganizationId ;
@@ -255,55 +254,13 @@ fn handle_replay_recording_item(
255254 } )
256255 . map ( Into :: into)
257256 . map_err ( |error| {
258- match & error {
259- relay_replays:: recording:: ParseRecordingError :: Compression ( e) => {
260- // 20k errors per day at 0.1% sample rate == 20 logs per day
261- if sample ( 0.001 ) . is_keep ( ) {
262- relay_log:: with_scope (
263- move |scope| {
264- scope. add_attachment ( relay_log:: protocol:: Attachment {
265- buffer : payload. into ( ) ,
266- filename : "payload" . to_owned ( ) ,
267- content_type : Some ( "application/octet-stream" . to_owned ( ) ) ,
268- ty : None ,
269- } ) ;
270- } ,
271- || {
272- relay_log:: error!(
273- error = e as & dyn Error ,
274- event_id = ?config. event_id,
275- project_id = config. project_id. map( |v| v. value( ) ) ,
276- organization_id = config. organization_id. map( |o| o. value( ) ) ,
277- "ParseRecordingError::Compression"
278- )
279- } ,
280- ) ;
281- }
282- }
283- relay_replays:: recording:: ParseRecordingError :: Message ( e) => {
284- // Only 118 errors in the past 30 days. We log everything.
285- relay_log:: with_scope (
286- move |scope| {
287- scope. add_attachment ( relay_log:: protocol:: Attachment {
288- buffer : payload. into ( ) ,
289- filename : "payload" . to_owned ( ) ,
290- content_type : Some ( "application/octet-stream" . to_owned ( ) ) ,
291- ty : None ,
292- } ) ;
293- } ,
294- || {
295- relay_log:: error!(
296- error = e,
297- event_id = ?config. event_id,
298- project_id = config. project_id. map( |v| v. value( ) ) ,
299- organization_id = config. organization_id. map( |o| o. value( ) ) ,
300- "ParseRecordingError::Message"
301- )
302- } ,
303- ) ;
304- }
305- _ => ( ) ,
306- } ;
257+ relay_log:: debug!(
258+ error = & error as & dyn Error ,
259+ event_id = ?config. event_id,
260+ project_id = config. project_id. map( |v| v. value( ) ) ,
261+ organization_id = config. organization_id. map( |o| o. value( ) ) ,
262+ "invalid replay recording"
263+ ) ;
307264 ProcessingError :: InvalidReplay ( DiscardReason :: InvalidReplayRecordingEvent )
308265 } )
309266}
0 commit comments