Skip to content

Commit 4c87df0

Browse files
committed
fix typo in 'sinks/influxdb/logs.rs'
1 parent 3569542 commit 4c87df0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/sinks/influxdb/logs.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,8 @@ impl HttpEventEncoder<BytesMut> for InfluxDbLogsEncoder {
281281

282282
if let Some(source_type_path) = log.source_type_path() {
283283
self.tags.replace(source_type_path);
284-
}
285-
286-
if let Some(source_type_key) = log_schema().source_type_key() {
287284
log.rename_key(
288-
(PathPrefix::Event, source_type_key),
285+
(PathPrefix::Event, source_type_path),
289286
(PathPrefix::Event, &self.source_type_key),
290287
);
291288
}

src/sources/http_server.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,9 @@ mod tests {
964964
lookup::PathPrefix::Event,
965965
log_schema().source_type_key().unwrap(),
966966
))
967-
.unwrap().as_str().unwrap();
967+
.unwrap()
968+
.as_str()
969+
.unwrap();
968970
assert_eq!(source_type_key_value, SimpleHttpConfig::NAME);
969971
assert_eq!(log["http_path"], "/".into());
970972
}

0 commit comments

Comments
 (0)