From 701fc6a06a66713b8afd03211b5f9e0560e2c6a8 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Tue, 17 Dec 2024 16:17:52 -0800 Subject: [PATCH] Nit spelling fixes --- .cspell.json | 2 ++ opentelemetry-otlp/examples/basic-otlp-http/README.md | 6 ++---- opentelemetry-otlp/examples/basic-otlp-http/src/main.rs | 4 ++-- opentelemetry-otlp/examples/basic-otlp/README.md | 4 ++-- opentelemetry-otlp/examples/basic-otlp/src/main.rs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.cspell.json b/.cspell.json index 23ecd03c8b..e6935508b9 100644 --- a/.cspell.json +++ b/.cspell.json @@ -49,7 +49,9 @@ "nocapture", "Ochtman", "opentelemetry", + "OTELCOL", "OTLP", + "periodicreader", "protoc", "quantile", "Redelmeier", diff --git a/opentelemetry-otlp/examples/basic-otlp-http/README.md b/opentelemetry-otlp/examples/basic-otlp-http/README.md index 2299cf0afb..eb65c74160 100644 --- a/opentelemetry-otlp/examples/basic-otlp-http/README.md +++ b/opentelemetry-otlp/examples/basic-otlp-http/README.md @@ -16,7 +16,7 @@ recommended approach when using OTLP exporters. While it can be modified to use a `SimpleExporter`, this requires enabling feature flag `reqwest-blocking-client` and making the `main()` a normal main and *not* `tokio::main` -// TODO: Metrics does not work with non tokio main when using `reqwest-blocking-client` today, fix that when switching +// TODO: Metrics does not work with non tokio main when using `reqwest-blocking-client` today, fix that when switching // default to use own thread. // TODO: Document `hyper` feature flag when using SimpleProcessor. @@ -66,14 +66,12 @@ Run the app which exports logs, metrics and traces via OTLP to the collector cargo run ``` - By default the app will use a `reqwest` client to send. A hyper 0.14 client can be used with the `hyper` feature enabled ```shell cargo run --no-default-features --features=hyper ``` - ## View results You should be able to see something similar below with different time and ID in the same console that docker runs. @@ -135,7 +133,7 @@ SpanEvent #0 -> Timestamp: 2024-05-14 02:15:56.824201397 +0000 UTC -> DroppedAttributesCount: 0 -> Attributes:: - -> bogons: Int(100) + -> some.key: Int(100) {"kind": "exporter", "data_type": "traces", "name": "logging"} ... ``` diff --git a/opentelemetry-otlp/examples/basic-otlp-http/src/main.rs b/opentelemetry-otlp/examples/basic-otlp-http/src/main.rs index 0d218a4b8a..ff06ce6b49 100644 --- a/opentelemetry-otlp/examples/basic-otlp-http/src/main.rs +++ b/opentelemetry-otlp/examples/basic-otlp-http/src/main.rs @@ -106,7 +106,7 @@ async fn main() -> Result<(), Box> { // Create a new tracing::Fmt layer to print the logs to stdout. It has a // default filter of `info` level and above, and `debug` and above for logs - // from OpenTelemtry crates. The filter levels can be customized as needed. + // from OpenTelemetry crates. The filter levels can be customized as needed. let filter_fmt = EnvFilter::new("info").add_directive("opentelemetry=debug".parse().unwrap()); let fmt_layer = tracing_subscriber::fmt::layer() .with_thread_names(true) @@ -148,7 +148,7 @@ async fn main() -> Result<(), Box> { let span = cx.span(); span.add_event( "Nice operation!".to_string(), - vec![KeyValue::new("bogons", 100)], + vec![KeyValue::new("some.key", 100)], ); span.set_attribute(KeyValue::new("another.key", "yes")); diff --git a/opentelemetry-otlp/examples/basic-otlp/README.md b/opentelemetry-otlp/examples/basic-otlp/README.md index 632e2155a6..ca02018ad5 100644 --- a/opentelemetry-otlp/examples/basic-otlp/README.md +++ b/opentelemetry-otlp/examples/basic-otlp/README.md @@ -15,7 +15,7 @@ recommended approach when using OTLP exporters. While it can be modified to use a `SimpleExporter`, this requires the main method to be a `tokio::main` function since the `tonic` client requires a Tokio runtime. If you prefer not to use `tokio::main`, then the `init_logs` and `init_traces` functions must be executed -within a Tokio runtime. +within a Tokio runtime. This examples uses the default `PeriodicReader` for metrics, which uses own thread for background processing/exporting. Since the `tonic` client requires a @@ -154,7 +154,7 @@ SpanEvent #0 -> Timestamp: 2024-05-22 20:25:42.8770471 +0000 UTC -> DroppedAttributesCount: 0 -> Attributes:: - -> bogons: Int(100) + -> some.key: Int(100) {"kind": "exporter", "data_type": "traces", "name": "logging"} ``` diff --git a/opentelemetry-otlp/examples/basic-otlp/src/main.rs b/opentelemetry-otlp/examples/basic-otlp/src/main.rs index 77dd4b5f91..dbe118f09a 100644 --- a/opentelemetry-otlp/examples/basic-otlp/src/main.rs +++ b/opentelemetry-otlp/examples/basic-otlp/src/main.rs @@ -80,7 +80,7 @@ async fn main() -> Result<(), Box> { // Create a new tracing::Fmt layer to print the logs to stdout. It has a // default filter of `info` level and above, and `debug` and above for logs - // from OpenTelemtry crates. The filter levels can be customized as needed. + // from OpenTelemetry crates. The filter levels can be customized as needed. let filter_fmt = EnvFilter::new("info").add_directive("opentelemetry=debug".parse().unwrap()); let fmt_layer = tracing_subscriber::fmt::layer() .with_thread_names(true)