Skip to content

Commit

Permalink
Fix changelog and few spell check issues (#2474)
Browse files Browse the repository at this point in the history
Co-authored-by: Zhongyang Wu <[email protected]>
  • Loading branch information
cijothomas and TommyCpp authored Dec 26, 2024
1 parent 5b86b7f commit 36f9caf
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"Bhasin",
"Cijo",
"clippy",
"clonable",
"codecov",
"datapoint",
"deque",
Expand All @@ -52,6 +53,7 @@
"OTELCOL",
"OTLP",
"periodicreader",
"prost",
"protoc",
"quantile",
"Redelmeier",
Expand Down
2 changes: 1 addition & 1 deletion examples/tracing-grpc/src/client.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use hello_world::greeter_client::GreeterClient;
use hello_world::HelloRequest;
use opentelemetry::{global, propagation::Injector};
use opentelemetry_sdk::{propagation::TraceContextPropagator, runtime::Tokio, trace as sdktrace};
use opentelemetry_sdk::{propagation::TraceContextPropagator, trace as sdktrace};
use opentelemetry_stdout::SpanExporter;

use opentelemetry::{
Expand Down
4 changes: 1 addition & 3 deletions examples/tracing-grpc/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ use opentelemetry::{
propagation::Extractor,
trace::{Span, SpanKind, Tracer},
};
use opentelemetry_sdk::{
propagation::TraceContextPropagator, runtime::Tokio, trace::TracerProvider,
};
use opentelemetry_sdk::{propagation::TraceContextPropagator, trace::TracerProvider};
use opentelemetry_stdout::SpanExporter;
use tonic::{transport::Server, Request, Response, Status};

Expand Down
2 changes: 1 addition & 1 deletion examples/tracing-jaeger/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use opentelemetry::{
KeyValue,
};
use opentelemetry_sdk::trace::TracerProvider;
use opentelemetry_sdk::{runtime, Resource};
use opentelemetry_sdk::Resource;

use std::error::Error;

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
transparent change.
[#2338](https://github.com/open-telemetry/opentelemetry-rust/pull/2338)
- `ResourceDetector.detect()` no longer supports timeout option.
- `opentelemetry::global::shutdown_tracer_provider()` Removed from the API, should now use `tracer_provider.shutdown()` see [#2369](https://github.com/open-telemetry/opentelemetry-rust/pull/2369) for a migration example. "Tracer provider" is cheaply cloneable, so users are encouraged to set a clone of it as the global (ex: `global::set_tracer_provider(provider.clone()))`, so that instrumentations and other components can obtain tracers from `global::tracer()`. The tracer_provider must be kept around to call shutdown on it at the end of application (ex: `tracer_provider.shutdown()`)
- `opentelemetry::global::shutdown_tracer_provider()` removed from the API, should now use `tracer_provider.shutdown()` see [#2369](https://github.com/open-telemetry/opentelemetry-rust/pull/2369) for a migration example. "Tracer provider" is cheaply clonable, so users are encouraged to set a clone of it as the global (ex: `global::set_tracer_provider(provider.clone()))`, so that instrumentations and other components can obtain tracers from `global::tracer()`. The tracer_provider must be kept around to call shutdown on it at the end of application (ex: `tracer_provider.shutdown()`)
- *Feature*: Add `ResourceBuilder` for an easy way to create new `Resource`s
- *Breaking*: Remove `Resource::{new,empty,from_detectors,new_with_defaults,from_schema_url,merge,default}` from public api. To create Resources you should only use `Resource::builder()` or `Resource::builder_empty()`. See [#2322](https://github.com/open-telemetry/opentelemetry-rust/pull/2322) for a migration guide.
Example Usage:
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/logs/log_emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl LoggerProviderInner {
// - Or the error occurs during `LoggerProviderInner::Drop` as part of telemetry shutdown,
// which is non-actionable by the user
match err {
// specific handling for mutex poisioning
// specific handling for mutex poisoning
LogError::MutexPoisoned(_) => {
otel_debug!(
name: "LoggerProvider.Drop.ShutdownMutexPoisoned",
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/logs/log_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ pub struct BatchConfigBuilder {

impl Default for BatchConfigBuilder {
/// Create a new [`BatchConfigBuilder`] initialized with default batch config values as per the specs.
/// The values are overriden by environment variables if set.
/// The values are overridden by environment variables if set.
/// The supported environment variables are:
/// * `OTEL_BLRP_MAX_QUEUE_SIZE`
/// * `OTEL_BLRP_SCHEDULE_DELAY`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ mod tests {
);

//
// deadloack happens in shutdown with tokio current_thread runtime
// deadlock happens in shutdown with tokio current_thread runtime
//
processor.shutdown().unwrap();
}
Expand Down Expand Up @@ -837,7 +837,7 @@ mod tests {
BatchLogProcessor::new(exporter.clone(), BatchConfig::default(), runtime::Tokio);

//
// deadloack happens in shutdown with tokio current_thread runtime
// deadlock happens in shutdown with tokio current_thread runtime
//
processor.shutdown().unwrap();
}
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-sdk/src/metrics/periodic_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ impl PeriodicReaderInner {
});
otel_debug!(name: "PeriodicReaderMetricsCollected", count = metrics_count);

// TODO: substract the time taken for collect from the timeout. collect
// TODO: subtract the time taken for collect from the timeout. collect
// involves observable callbacks too, which are user defined and can
// take arbitrary time.
//
Expand Down Expand Up @@ -887,7 +887,7 @@ mod tests {
})
.build();
// rt here is a reference to the current tokio runtime.
// Droppng it occurs when the tokio::main itself ends.
// Dropping it occurs when the tokio::main itself ends.
} else {
let rt = tokio::runtime::Runtime::new().unwrap();
let _gauge = meter
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/trace/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ mod tests {
// noop tracer's tracer provider should be shutdown
assert!(noop_tracer.provider().is_shutdown());

// existing tracer becomes noops after shutdown
// existing tracer becomes noop after shutdown
let _ = test_tracer_1.start("test");
assert!(assert_handle.started_span_count(2));

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/trace/span_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl SpanProcessor for SimpleSpanProcessor {
.and_then(|mut exporter| futures_executor::block_on(exporter.export(vec![span])));

if let Err(err) = result {
// TODO: check error type, and log `error` only if the error is user-actiobable, else log `debug`
// TODO: check error type, and log `error` only if the error is user-actionable, else log `debug`
otel_debug!(
name: "SimpleProcessor.OnEnd.Error",
reason = format!("{:?}", err)
Expand Down
1 change: 1 addition & 0 deletions opentelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## vNext

- Bump msrv to 1.75.0.
- **Breaking** `opentelemetry::global::shutdown_tracer_provider()` Removed from this crate, should now use `tracer_provider.shutdown()` see [#2369](https://github.com/open-telemetry/opentelemetry-rust/pull/2369) for a migration example.

## 0.27.1

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry/src/trace/noop.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! No-op trace impls
//! No-op trace implementation
//!
//! This implementation is returned as the global tracer if no `Tracer`
//! has been set. It is also useful for testing purposes as it is intended
Expand Down

0 comments on commit 36f9caf

Please sign in to comment.