Skip to content

Commit

Permalink
fix typo in 'sinks/influxdb/logs.rs'
Browse files Browse the repository at this point in the history
  • Loading branch information
pront committed Jul 12, 2023
1 parent 3569542 commit 07307a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/sinks/influxdb/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,9 @@ impl HttpEventEncoder<BytesMut> 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() {
self.tags.replace(source_type_path.clone());
log.rename_key(
(PathPrefix::Event, source_type_key),
(PathPrefix::Event, source_type_path.as_str()),
(PathPrefix::Event, &self.source_type_key),
);
}
Expand Down
4 changes: 3 additions & 1 deletion src/sources/http_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 07307a4

Please sign in to comment.