Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions opentelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- **Breaking** Removed the following public fields and methods from the `SpanBuilder` [#3227][3227]:
- `trace_id`, `span_id`, `end_time`, `status`, `sampling_result`
- `with_trace_id`, `with_span_id`, `with_end_time`, `with_status`, `with_sampling_result`
- **Added** `#[must_use]` attribute to `opentelemetry::metrics::AsyncInstrumentBuilder` to add compile time warning when `.build()` is not called on observable instrument builders, preventing silent failures where callbacks are never registered and metrics are never reported.

[3227]: https://github.com/open-telemetry/opentelemetry-rust/pull/3227

Expand Down Expand Up @@ -117,10 +118,10 @@ let counter = meter.u64_counter("my_counter").build();
- Replaced `global::meter_with_version` with `global::meter_with_scope`
- Added `global::tracer_with_scope`
- Refer to PR description for migration guide.
- **Breaking change**: replaced `InstrumentationScope` public attributes by getters [#2275](https://github.com/open-telemetry/opentelemetry-rust/pull/2275)
- **Breaking change**: replaced `InstrumentationScope` public attributes by getters [#2275](https://github.com/open-telemetry/opentelemetry-rust/pull/2275)

- **Breaking change**: [#2260](https://github.com/open-telemetry/opentelemetry-rust/pull/2260)
- Removed `global::set_error_handler` and `global::handle_error`.
- Removed `global::set_error_handler` and `global::handle_error`.
- `global::handle_error` usage inside the opentelemetry crates has been replaced with `global::otel_info`, `otel_warn`, `otel_debug` and `otel_error` macros based on the severity of the internal logs.
- The default behavior of `global::handle_error` was to log the error using `eprintln!`. With otel macros, the internal logs get emitted via `tracing` macros of matching severity. Users now need to configure a `tracing` layer/subscriber to capture these logs.
- Refer to PR description for migration guide. Also refer to [self-diagnostics](https://github.com/open-telemetry/opentelemetry-rust/tree/main/examples/self-diagnostics) example to learn how to view internal logs in stdout using `tracing::fmt` layer.
Expand Down Expand Up @@ -220,7 +221,7 @@ to learn how to provide Observable callbacks.
opaque string. Migration: Replace `.with_unit(Unit::new("myunit"))` with
`.with_unit("myunit")`.

- [1869](https://github.com/open-telemetry/opentelemetry-rust/pull/1869) Introduced the `LogRecord::set_target()` method in the log bridge API.
- [1869](https://github.com/open-telemetry/opentelemetry-rust/pull/1869) Introduced the `LogRecord::set_target()` method in the log bridge API.
This method allows appenders to set the target/component emitting the logs.

## v0.23.0
Expand All @@ -241,7 +242,7 @@ This method allows appenders to set the target/component emitting the logs.
- opentelemetry::global::shutdown_logger_provider
- opentelemetry::global::logger_provider
- opentelemetry::global::GlobalLoggerProvider
- opentelemetry::global::ObjectSafeLoggerProvider
- opentelemetry::global::ObjectSafeLoggerProvider
For creating appenders using Logging bridge API, refer to the opentelemetry-tracing-appender [example](https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-appender-tracing/examples/basic.rs)

### Changed
Expand Down
1 change: 1 addition & 0 deletions opentelemetry/src/metrics/instruments/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ impl<T> fmt::Debug for HistogramBuilder<'_, T> {
pub type Callback<T> = Box<dyn Fn(&dyn AsyncInstrument<T>) + Send + Sync>;

/// Configuration for building an async instrument.
#[must_use = "Callbacks will not be invoked unless you call .build() on this async instrument builder."]
#[non_exhaustive] // We expect to add more configuration fields in the future
pub struct AsyncInstrumentBuilder<'a, I, M> {
/// Instrument provider is used to create the instrument.
Expand Down