Skip to content

Commit

Permalink
Container apps unit is now container group name minus container app n…
Browse files Browse the repository at this point in the history
…ame.
  • Loading branch information
bittrance committed Nov 6, 2023
1 parent 6c3191e commit 7927e65
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/assembly/container_apps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ fn opsinsights_container_apps_query(opts: &Opts) -> Query {
fn container_apps_row_to_entry(row: Map<String, Value>) -> LogEntry {
let timestamp = unwrap_as_rfc3339(row.get("TimeGenerated"));
let group = unwrap_as_str(row.get("ContainerAppName_s")).to_owned();
let unit = unwrap_as_str(row.get("ContainerName_s")).to_owned();
let unit = unwrap_as_str(row.get("ContainerGroupName_s"))
.replace(&group, "")
.chars()
.skip_while(|c| *c == '-')
.collect();
let level = match row.get("Stream_s").unwrap().as_str() {
Some(s) if s == "stderr" => Level::Error,
Some(_) => Level::Info,
Expand Down

0 comments on commit 7927e65

Please sign in to comment.