From 9111042cec2b3db3c59409ae1fa3fdf1fbc7aec1 Mon Sep 17 00:00:00 2001 From: Bittrance Date: Sun, 23 Jan 2022 08:58:39 +0100 Subject: [PATCH] Various spelling errors. --- README.md | 2 +- src/assembly/apim.rs | 6 +++--- src/assembly/functions.rs | 10 +++++----- src/options.rs | 6 +++--- src/source.rs | 2 +- src/source/{appsinsight.rs => appinsight.rs} | 0 6 files changed, 13 insertions(+), 13 deletions(-) rename src/source/{appsinsight.rs => appinsight.rs} (100%) diff --git a/README.md b/README.md index c9ccbaf..e113804 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Currently supported Azure services: - Azure Functions - Azure API Management -Several more services are in the works:s see the [sources](./examples/README.md) page for details on how filters are applied and what data is retrieved. +Several more services are in the works: see the [sources](./examples/README.md) page for details on how filters are applied and what data is retrieved. ## Install diff --git a/src/assembly/apim.rs b/src/assembly/apim.rs index 60b3c3f..91278fd 100644 --- a/src/assembly/apim.rs +++ b/src/assembly/apim.rs @@ -1,7 +1,7 @@ use crate::assembly::{unwrap_as_rfc3339, unwrap_as_str}; use crate::kusto::{EndsWith, Filter, Operator, Or, Ordering, Query, StartsWith, Timespan}; use crate::options::{Opts, Service}; -use crate::source::{appsinsight::AppInsights, opsinsight::OpsLogs, Level, LogEntry, LogSource}; +use crate::source::{appinsight::AppInsights, opsinsight::OpsLogs, Level, LogEntry, LogSource}; use serde_json::{json, Map, Value}; pub fn appinsights(opts: &Opts) -> impl IntoIterator> { @@ -54,7 +54,7 @@ pub fn appinsights_requests_row_to_entry(row: Map) -> LogEntry { } else { Level::Warn }; - let message = appsinsights_requests_message_line(&row); + let message = appinsights_requests_message_line(&row); LogEntry { timestamp, group, @@ -65,7 +65,7 @@ pub fn appinsights_requests_row_to_entry(row: Map) -> LogEntry { } } -fn appsinsights_requests_message_line(row: &Map) -> String { +fn appinsights_requests_message_line(row: &Map) -> String { let url = unwrap_as_str(row.get("url")); let status_code = unwrap_as_str(row.get("resultCode")); let dimensions: Map = diff --git a/src/assembly/functions.rs b/src/assembly/functions.rs index 808215c..2640de7 100644 --- a/src/assembly/functions.rs +++ b/src/assembly/functions.rs @@ -3,12 +3,12 @@ use serde_json::{Map, Value}; use crate::{ kusto::{Eq, Filter, Operator, Or, Ordering, Query, Timespan}, options::{Opts, Service}, - source::{appsinsight::AppInsights, opsinsight::OpsLogs, Level, LogEntry, LogSource}, + source::{appinsight::AppInsights, opsinsight::OpsLogs, Level, LogEntry, LogSource}, }; use super::{unwrap_as_rfc3339, unwrap_as_str}; -fn appsinsights_functions_query(opts: &Opts) -> Query { +fn appinsights_functions_query(opts: &Opts) -> Query { let timespan = Timespan::new("timestamp".to_owned(), opts.start_time, opts.end_time); let mut operators: Vec> = Vec::new(); if !opts.function_app.is_empty() { @@ -38,7 +38,7 @@ pub fn appinsights(opts: &Opts) -> impl IntoIterator> return None; } Some(AppInsights::boxed( - appsinsights_functions_query(opts), + appinsights_functions_query(opts), Box::new(traces_row_to_entry), opts.clone(), )) @@ -138,10 +138,10 @@ mod test { } #[test] - fn appsinsights_functions_respects_filters() { + fn appinsights_functions_respects_filters() { let args = base_args().chain(vec!["--function-app", "ze-app"]); let opts = cli_opts(args).unwrap(); - let query = super::appsinsights_functions_query(&opts); + let query = super::appinsights_functions_query(&opts); assert_that(&query.to_string()).contains("ze-app"); } diff --git a/src/options.rs b/src/options.rs index 217c114..c3b4387 100644 --- a/src/options.rs +++ b/src/options.rs @@ -32,9 +32,9 @@ impl FromStr for OutputFormat { } } -/// Query tables in a App Insights or Log Analytics workspace and presents +/// Query tables in a Application Insights or Log Analytics workspace and presents /// the result as a human-readable log stream. When executed with only an -/// App ID or Workspace ID, aztail retrieves logs from all known services. +/// Application ID or Workspace ID, aztail retrieves logs from all known services. /// If one or more filter arguments are used, only logs matching those /// filters will be retrieved. Multiple filters can be used and will /// retrieve the union of matching data. @@ -42,7 +42,7 @@ impl FromStr for OutputFormat { #[derive(Clone, Debug, Parser)] #[clap(version = "0.8.0")] pub struct Opts { - /// The "Application ID" of the App Insight where logs reside + /// The "Application ID" of the Application Insights where logs reside #[clap(short, long)] pub app_id: Option, /// The ID of the Log Analytics workspace where logs reside diff --git a/src/source.rs b/src/source.rs index a29f06c..d565e0e 100644 --- a/src/source.rs +++ b/src/source.rs @@ -4,7 +4,7 @@ use async_trait::async_trait; use chrono::{DateTime, FixedOffset}; use serde_json::{map::Map, value::Value}; -pub mod appsinsight; +pub mod appinsight; pub mod opsinsight; #[derive(Clone, Copy, Debug, PartialEq)] diff --git a/src/source/appsinsight.rs b/src/source/appinsight.rs similarity index 100% rename from src/source/appsinsight.rs rename to src/source/appinsight.rs