diff --git a/rust_snuba/src/strategies/processor.rs b/rust_snuba/src/strategies/processor.rs index 7797fedcd1..567a7e836c 100644 --- a/rust_snuba/src/strategies/processor.rs +++ b/rust_snuba/src/strategies/processor.rs @@ -148,7 +148,10 @@ impl MessageProcessor { self, message: Message, ) -> Result, RunTaskError> { - validate_schema(&message, &self.schema, self.enforce_schema)?; + if let Err(error) = validate_schema(&message, &self.schema, self.enforce_schema) { + counter!("snuba.consumer.schema_validation.failed"); + return Err(error); + }; let msg = match message.inner_message { InnerMessage::BrokerMessage(msg) => msg,