From 4c87df0bf6a3cf7e31443e645e796e8c97f5027c Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Wed, 12 Jul 2023 13:10:52 -0400 Subject: [PATCH] fix typo in 'sinks/influxdb/logs.rs' --- src/sinks/influxdb/logs.rs | 5 +---- src/sources/http_server.rs | 4 +++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/sinks/influxdb/logs.rs b/src/sinks/influxdb/logs.rs index 5e8f5b33dc6e8a..50203e264dba07 100644 --- a/src/sinks/influxdb/logs.rs +++ b/src/sinks/influxdb/logs.rs @@ -281,11 +281,8 @@ impl HttpEventEncoder for InfluxDbLogsEncoder { if let Some(source_type_path) = log.source_type_path() { self.tags.replace(source_type_path); - } - - if let Some(source_type_key) = log_schema().source_type_key() { log.rename_key( - (PathPrefix::Event, source_type_key), + (PathPrefix::Event, source_type_path), (PathPrefix::Event, &self.source_type_key), ); } diff --git a/src/sources/http_server.rs b/src/sources/http_server.rs index 1ad581b0d7136b..cadd154fc87954 100644 --- a/src/sources/http_server.rs +++ b/src/sources/http_server.rs @@ -964,7 +964,9 @@ mod tests { lookup::PathPrefix::Event, log_schema().source_type_key().unwrap(), )) - .unwrap().as_str().unwrap(); + .unwrap() + .as_str() + .unwrap(); assert_eq!(source_type_key_value, SimpleHttpConfig::NAME); assert_eq!(log["http_path"], "/".into()); }