Skip to content

Commit

Permalink
Update src/sinks/kafka/service.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Bruce Guenter <bruce.guenter@datadoghq.com>
  • Loading branch information
dsmith3197 and bruceg authored Sep 22, 2023
1 parent 134fb9b commit 8bacaf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sinks/kafka/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl Service<KafkaRequest> for KafkaService {
match this.kafka_producer.send(record, Timeout::Never).await {
Ok((_partition, _offset)) => {
let raw_byte_size =
request.body.len() + request.metadata.key.map(|x| x.len()).unwrap_or(0);
request.body.len() + request.metadata.key.map_or(0, |x| x.len());
Ok(KafkaResponse {
event_byte_size,
raw_byte_size,
Expand Down

0 comments on commit 8bacaf5

Please sign in to comment.