Skip to content

Commit

Permalink
Various spelling errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
bittrance committed Jan 23, 2022
1 parent 9475237 commit 9111042
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions src/assembly/apim.rs
Original file line number Diff line number Diff line change
@@ -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<Item = Box<dyn LogSource>> {
Expand Down Expand Up @@ -54,7 +54,7 @@ pub fn appinsights_requests_row_to_entry(row: Map<String, Value>) -> LogEntry {
} else {
Level::Warn
};
let message = appsinsights_requests_message_line(&row);
let message = appinsights_requests_message_line(&row);
LogEntry {
timestamp,
group,
Expand All @@ -65,7 +65,7 @@ pub fn appinsights_requests_row_to_entry(row: Map<String, Value>) -> LogEntry {
}
}

fn appsinsights_requests_message_line(row: &Map<String, Value>) -> String {
fn appinsights_requests_message_line(row: &Map<String, Value>) -> String {
let url = unwrap_as_str(row.get("url"));
let status_code = unwrap_as_str(row.get("resultCode"));
let dimensions: Map<String, Value> =
Expand Down
10 changes: 5 additions & 5 deletions src/assembly/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Box<dyn Operator>> = Vec::new();
if !opts.function_app.is_empty() {
Expand Down Expand Up @@ -38,7 +38,7 @@ pub fn appinsights(opts: &Opts) -> impl IntoIterator<Item = Box<dyn LogSource>>
return None;
}
Some(AppInsights::boxed(
appsinsights_functions_query(opts),
appinsights_functions_query(opts),
Box::new(traces_row_to_entry),
opts.clone(),
))
Expand Down Expand Up @@ -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");
}

Expand Down
6 changes: 3 additions & 3 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ 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.
#[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<String>,
/// The ID of the Log Analytics workspace where logs reside
Expand Down
2 changes: 1 addition & 1 deletion src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
File renamed without changes.

0 comments on commit 9111042

Please sign in to comment.