Skip to content

Commit 36f9caf

Browse files
cijothomasTommyCpp
andauthored
Fix changelog and few spell check issues (#2474)
Co-authored-by: Zhongyang Wu <zhongyang.wu@outlook.com>
1 parent 5b86b7f commit 36f9caf

File tree

13 files changed

+16
-15
lines changed

13 files changed

+16
-15
lines changed

.cspell.json

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"Bhasin",
3232
"Cijo",
3333
"clippy",
34+
"clonable",
3435
"codecov",
3536
"datapoint",
3637
"deque",
@@ -52,6 +53,7 @@
5253
"OTELCOL",
5354
"OTLP",
5455
"periodicreader",
56+
"prost",
5557
"protoc",
5658
"quantile",
5759
"Redelmeier",

examples/tracing-grpc/src/client.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use hello_world::greeter_client::GreeterClient;
22
use hello_world::HelloRequest;
33
use opentelemetry::{global, propagation::Injector};
4-
use opentelemetry_sdk::{propagation::TraceContextPropagator, runtime::Tokio, trace as sdktrace};
4+
use opentelemetry_sdk::{propagation::TraceContextPropagator, trace as sdktrace};
55
use opentelemetry_stdout::SpanExporter;
66

77
use opentelemetry::{

examples/tracing-grpc/src/server.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ use opentelemetry::{
55
propagation::Extractor,
66
trace::{Span, SpanKind, Tracer},
77
};
8-
use opentelemetry_sdk::{
9-
propagation::TraceContextPropagator, runtime::Tokio, trace::TracerProvider,
10-
};
8+
use opentelemetry_sdk::{propagation::TraceContextPropagator, trace::TracerProvider};
119
use opentelemetry_stdout::SpanExporter;
1210
use tonic::{transport::Server, Request, Response, Status};
1311

examples/tracing-jaeger/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use opentelemetry::{
44
KeyValue,
55
};
66
use opentelemetry_sdk::trace::TracerProvider;
7-
use opentelemetry_sdk::{runtime, Resource};
7+
use opentelemetry_sdk::Resource;
88

99
use std::error::Error;
1010

opentelemetry-sdk/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
transparent change.
1414
[#2338](https://github.com/open-telemetry/opentelemetry-rust/pull/2338)
1515
- `ResourceDetector.detect()` no longer supports timeout option.
16-
- `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()`)
16+
- `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()`)
1717
- *Feature*: Add `ResourceBuilder` for an easy way to create new `Resource`s
1818
- *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.
1919
Example Usage:

opentelemetry-sdk/src/logs/log_emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl LoggerProviderInner {
140140
// - Or the error occurs during `LoggerProviderInner::Drop` as part of telemetry shutdown,
141141
// which is non-actionable by the user
142142
match err {
143-
// specific handling for mutex poisioning
143+
// specific handling for mutex poisoning
144144
LogError::MutexPoisoned(_) => {
145145
otel_debug!(
146146
name: "LoggerProvider.Drop.ShutdownMutexPoisoned",

opentelemetry-sdk/src/logs/log_processor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ pub struct BatchConfigBuilder {
610610

611611
impl Default for BatchConfigBuilder {
612612
/// Create a new [`BatchConfigBuilder`] initialized with default batch config values as per the specs.
613-
/// The values are overriden by environment variables if set.
613+
/// The values are overridden by environment variables if set.
614614
/// The supported environment variables are:
615615
/// * `OTEL_BLRP_MAX_QUEUE_SIZE`
616616
/// * `OTEL_BLRP_SCHEDULE_DELAY`

opentelemetry-sdk/src/logs/log_processor_with_async_runtime.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ mod tests {
591591
);
592592

593593
//
594-
// deadloack happens in shutdown with tokio current_thread runtime
594+
// deadlock happens in shutdown with tokio current_thread runtime
595595
//
596596
processor.shutdown().unwrap();
597597
}
@@ -837,7 +837,7 @@ mod tests {
837837
BatchLogProcessor::new(exporter.clone(), BatchConfig::default(), runtime::Tokio);
838838

839839
//
840-
// deadloack happens in shutdown with tokio current_thread runtime
840+
// deadlock happens in shutdown with tokio current_thread runtime
841841
//
842842
processor.shutdown().unwrap();
843843
}

opentelemetry-sdk/src/metrics/periodic_reader.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ impl PeriodicReaderInner {
350350
});
351351
otel_debug!(name: "PeriodicReaderMetricsCollected", count = metrics_count);
352352

353-
// TODO: substract the time taken for collect from the timeout. collect
353+
// TODO: subtract the time taken for collect from the timeout. collect
354354
// involves observable callbacks too, which are user defined and can
355355
// take arbitrary time.
356356
//
@@ -887,7 +887,7 @@ mod tests {
887887
})
888888
.build();
889889
// rt here is a reference to the current tokio runtime.
890-
// Droppng it occurs when the tokio::main itself ends.
890+
// Dropping it occurs when the tokio::main itself ends.
891891
} else {
892892
let rt = tokio::runtime::Runtime::new().unwrap();
893893
let _gauge = meter

opentelemetry-sdk/src/trace/provider.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ mod tests {
680680
// noop tracer's tracer provider should be shutdown
681681
assert!(noop_tracer.provider().is_shutdown());
682682

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

opentelemetry-sdk/src/trace/span_processor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl SpanProcessor for SimpleSpanProcessor {
132132
.and_then(|mut exporter| futures_executor::block_on(exporter.export(vec![span])));
133133

134134
if let Err(err) = result {
135-
// TODO: check error type, and log `error` only if the error is user-actiobable, else log `debug`
135+
// TODO: check error type, and log `error` only if the error is user-actionable, else log `debug`
136136
otel_debug!(
137137
name: "SimpleProcessor.OnEnd.Error",
138138
reason = format!("{:?}", err)

opentelemetry/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## vNext
44

55
- Bump msrv to 1.75.0.
6+
- **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.
67

78
## 0.27.1
89

opentelemetry/src/trace/noop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! No-op trace impls
1+
//! No-op trace implementation
22
//!
33
//! This implementation is returned as the global tracer if no `Tracer`
44
//! has been set. It is also useful for testing purposes as it is intended

0 commit comments

Comments
 (0)