Skip to content

deps: update rust crate opentelemetry to 0.29 #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 6, 2024

This PR contains the following updates:

Package Type Update Change
opentelemetry (source) dependencies minor 0.18 -> 0.29
opentelemetry (source) dependencies minor 0.19 -> 0.29

Release Notes

open-telemetry/opentelemetry-rust (opentelemetry)

v0.29.0

Compare Source

Released 2025-Mar-21

  • Breaking Moved ExportError trait from opentelemetry::trace::ExportError to opentelemetry_sdk::export::ExportError
  • Breaking Moved TraceError enum from opentelemetry::trace::TraceError to opentelemetry_sdk::trace::TraceError
  • Breaking Moved TraceResult type alias from opentelemetry::trace::TraceResult to opentelemetry_sdk::trace::TraceResult
  • Bug Fix: InstrumentationScope implementation for PartialEq and Hash fixed to include Attributes also.
  • Breaking changes for baggage users: #​2717
    • Changed value type of Baggage from Value to StringValue
    • Updated Baggage constants to reflect latest standard (MAX_KEY_VALUE_PAIRS - 180 -> 64, MAX_BYTES_FOR_ONE_PAIR - removed) and increased insert performance see #2284.
    • Align Baggage.remove() signature with .get() to take the key as a reference
    • Baggage can't be retrieved from the Context directly anymore and needs to be accessed via context.baggage()
    • with_baggage() and current_with_baggage() override any existing Baggage in the Context
    • Baggage keys can't be empty and only allow ASCII visual chars, except "(),/:;<=>?@&#8203;[\]{} (see RFC7230, Section 3.2.6)
    • KeyValueMetadata does not publicly expose its fields. This should be transparent change to the users.
  • Changed Context to use a stack to properly handle out of order dropping of ContextGuard. This imposes a limit of 65535 nested contexts on a single thread. See #2378 and #1887.
  • Added additional name: Option<&str> parameter to the event_enabled method
    on the Logger trait. This allows implementations (SDK, processor, exporters)
    to leverage this additional information to determine if an event is enabled.

v0.28.0

Compare Source

Released 2025-Feb-10

  • Bump msrv to 1.75.0.
  • Breaking opentelemetry::global::shutdown_tracer_provider() Removed from this crate, should now use tracer_provider.shutdown() see #​2369 for a migration example.
  • Breaking Removed unused opentelemetry::PropagationError struct.

v0.27.1

Compare Source

Released 2024-Nov-27

v0.27.0

Compare Source

Released 2024-Nov-11

  • Bump MSRV to 1.70 #​2179
  • Add LogRecord::set_trace_context; an optional method conditional on the trace feature for setting trace context on a log record.
  • Removed unnecessary public methods named as_any from AsyncInstrument trait and the implementing instruments: ObservableCounter, ObservableGauge, and ObservableUpDownCounter #​2187
  • Introduced SyncInstrument trait to replace the individual synchronous instrument traits (SyncCounter, SyncGauge, SyncHistogram, SyncUpDownCounter) which are meant for SDK implementation. #​2207
  • Ensured that observe method on asynchronous instruments can only be called inside a callback. This was done by removing the implementation of AsyncInstrument trait for each of the asynchronous instruments. #​2210
  • Removed PartialOrd and Ord implementations for KeyValue. #​2215
  • Breaking change for exporter authors: Marked KeyValue related structs and enums as non_exhaustive. #​2228
  • Breaking change for log exporter authors: Marked AnyValue enum as non_exhaustive. #​2230
  • Breaking change for Metrics users: The init method used to create instruments has been renamed to build. Also, try_init() method is removed from instrument builders. The return types of InstrumentProvider trait methods modified to return the instrument struct, instead of Result. #​2227

Before:

let counter = meter.u64_counter("my_counter").init();

Now:

let counter = meter.u64_counter("my_counter").build();
  • Breaking change: #​2220

    • Removed deprecated method InstrumentationLibrary::new
    • Renamed InstrumentationLibrary to InstrumentationScope
    • Renamed InstrumentationLibraryBuilder to InstrumentationScopeBuilder
    • Removed deprecated methods LoggerProvider::versioned_logger and TracerProvider::versioned_tracer
    • Removed methods LoggerProvider::logger_builder, TracerProvider::tracer_builder and MeterProvider::versioned_meter
    • Replaced these methods with LoggerProvider::logger_with_scope, TracerProvider::logger_with_scope, MeterProvider::meter_with_scope
    • 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

  • Breaking change: #​2260

    • 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 example to learn how to view internal logs in stdout using tracing::fmt layer.
  • Breaking change for exporter/processor authors: #​2266

    • Moved ExportError trait from opentelemetry::ExportError to opentelemetry_sdk::export::ExportError
    • Created new trait opentelemetry::trace::ExportError for trace API. This would be eventually be consolidated with ExportError in the SDK.
    • Moved LogError enum from opentelemetry::logs::LogError to opentelemetry_sdk::logs::LogError
    • Moved LogResult type alias from opentelemetry::logs::LogResult to opentelemetry_sdk::logs::LogResult
    • Moved MetricError enum from opentelemetry::metrics::MetricError to opentelemetry_sdk::metrics::MetricError
    • Moved MetricResult type alias from opentelemetry::metrics::MetricResult to opentelemetry_sdk::metrics::MetricResult
      These changes shouldn't directly affect the users of OpenTelemetry crate, as these constructs are used in SDK and Exporters. If you are an author of an sdk component/plug-in, like an exporter etc. please use these types from sdk. Refer CHANGELOG.md for more details, under same version section.
  • Breaking 2291 Rename logs_level_enabled flag to spec_unstable_logs_enabled. Please enable this updated flag if the feature is needed. This flag will be removed once the feature is stabilized in the specifications.

v0.26.0

Compare Source

Released 2024-Sep-30

  • BREAKING Public API changes:

    • Removed: Key.bool(), Key.i64(), Key.f64(), Key.string(), Key.array() #​2090. These APIs were redundant as they didn't offer any additional functionality. The existing KeyValue::new() API covers all the scenarios offered by these APIs.

    • Removed: ObjectSafeMeterProvider and GlobalMeterProvider #​2112. These APIs were unnecessary and were mainly meant for internal use.

    • Modified: MeterProvider.meter() and MeterProvider.versioned_meter() argument types have been updated to &'static str instead of impl Into<Cow<'static, str>>> #​2112. These APIs were modified to enforce the Meter name, version, and schema_url to be &'static str.

    • Renamed: NoopMeterCore to NoopMeter

  • Added with_boundaries API to allow users to provide custom bounds for Histogram instruments. #​2135

v0.25.0

Compare Source

  • BREAKING #​1993 Box complex types in AnyValue enum
    Before:
#[derive(Debug, Clone, PartialEq)]
pub enum AnyValue {
    /// An integer value
    Int(i64),
    /// A double value
    Double(f64),
    /// A string value
    String(StringValue),
    /// A boolean value
    Boolean(bool),
    /// A byte array
    Bytes(Vec<u8>),
    /// An array of `Any` values
    ListAny(Vec<AnyValue>),
    /// A map of string keys to `Any` values, arbitrarily nested.
    Map(HashMap<Key, AnyValue>),
}

After:

#[derive(Debug, Clone, PartialEq)]
pub enum AnyValue {
    /// An integer value
    Int(i64),
    /// A double value
    Double(f64),
    /// A string value
    String(StringValue),
    /// A boolean value
    Boolean(bool),
    /// A byte array
    Bytes(Box<Vec<u8>>),
    /// An array of `Any` values
    ListAny(Box<Vec<AnyValue>>),
    /// A map of string keys to `Any` values, arbitrarily nested.
    Map(Box<HashMap<Key, AnyValue>>),
}

So the custom log appenders should box these types while adding them in message body, or
attribute values. Similarly, the custom exporters should dereference these complex type values
before serializing.

Breaking :
#​2015 Removed
the ability to register callbacks for Observable instruments on Meter directly.
If you were using meter.register_callback to provide the callback, provide
them using with_callback method, while creating the Observable instrument
itself.
1715
shows the exact changes needed to make this migration. If you are starting new,
refer to the
examples
to learn how to provide Observable callbacks.

v0.24.0

Compare Source

  • Add "metrics", "logs" to default features. With this, default feature list is
    "trace", "metrics" and "logs".

  • When "metrics" feature is enabled, KeyValue implements PartialEq, Eq,
    PartialOrder, Order, Hash. This is meant to be used for metrics
    aggregation purposes only.

  • Removed Unit struct for specifying Instrument units. Unit is treated as an
    opaque string. Migration: Replace .with_unit(Unit::new("myunit")) with
    .with_unit("myunit").

  • 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

Compare Source

Added
  • #​1640 Add PropagationError
  • #​1701 Gauge no longer requires otel-unstable feature flag, as OpenTelemetry specification for Gauge instrument is stable.
Removed
  • Remove urlencoding crate dependency. #​1613
  • Remove global providers for Logs $1691
    LoggerProviders are not meant for end users to get loggers from. It is only required for the log bridges.
    Below global constructs for the logs are removed from API:
    - opentelemetry::global::logger
    - opentelemetry::global::set_logger_provider
    - opentelemetry::global::shutdown_logger_provider
    - opentelemetry::global::logger_provider
    - opentelemetry::global::GlobalLoggerProvider
    - opentelemetry::global::ObjectSafeLoggerProvider
    For creating appenders using Logging bridge API, refer to the opentelemetry-tracing-appender example
Changed
  • BREAKING Moving LogRecord implementation to the SDK. 1702.

    • Relocated LogRecord struct to SDK.
    • Introduced the LogRecord trait in the API for populating log records. This trait is implemented by the SDK.
      This is the breaking change for the authors of Log Appenders. Refer to the opentelemetry-appender-tracing for more details.
  • Deprecate versioned_logger() in favor of logger_builder() 1567.

Before:

let logger = provider.versioned_logger(
    "my-logger-name",
    Some(env!("CARGO_PKG_VERSION")),
    Some("https://opentelemetry.io/schema/1.0.0"),
    Some(vec![KeyValue::new("key", "value")]),
);

After:

let logger = provider
    .logger_builder("my-logger-name")
    .with_version(env!("CARGO_PKG_VERSION"))
    .with_schema_url("https://opentelemetry.io/schema/1.0.0")
    .with_attributes(vec![KeyValue::new("key", "value")])
    .build();
  • Deprecate versioned_tracer() in favor of tracer_builder() 1567.

Before:

let tracer = provider.versioned_tracer(
    "my-tracer-name",
    Some(env!("CARGO_PKG_VERSION")),
    Some("https://opentelemetry.io/schema/1.0.0"),
    Some(vec![KeyValue::new("key", "value")]),
);

After:

let tracer = provider
    .tracer_builder("my-tracer-name")
    .with_version(env!("CARGO_PKG_VERSION"))
    .with_schema_url("https://opentelemetry.io/schema/1.0.0")
    .with_attributes(vec![KeyValue::new("key", "value")])
    .build();

v0.22.0

Compare Source

Added
  • #​1410 Add experimental synchronous gauge. This is behind the feature flag, and can be enabled by enabling the feature otel_unstable for opentelemetry crate.

  • #​1410 Guidelines to add new unstable/experimental features.

Changed
  • Modified AnyValue.Map to be backed by HashMap instead of custom OrderMap,
    which internally used IndexMap. There was no requirement to maintain the order
    of entries, so moving from IndexMap to HashMap offers slight performance
    gains, and avoids IndexMap dependency. This affects body and attributes of
    LogRecord.
    #​1353
  • Add TextMapCompositePropagator #​1373
  • Turned off events for NoopLogger to save on operations
    #​1455
Removed
  • Removed OrderMap type as there was no requirement to use this over regular
    HashMap.
    #​1353
  • Remove API for Creating Histograms with signed integers. #​1371
  • Remove global::shutdown_meter_provider, use SdkMeterProvider::shutdown
    directly instead #​1412.

v0.21.0

Compare Source

This release should been seen as 1.0-rc4 following 1.0-rc3 in v0.20.0. Refer to CHANGELOG.md in individual creates for details on changes made in different creates.

Changed
  • Bump MSRV to 1.65 #​1318
  • Bump MSRV to 1.64 #​1203
  • opentelemetry crate now only carries the API types #​1186. Use the opentelemetry_sdk crate for the SDK types.
  • trace::noop::NoopSpan no longer implements Default and instead exposes
    a const DEFAULT value. #​1270
  • Updated crate documentation and examples.
    #​1256
  • Breaking SpanBuilder attributes changed from OrderMap<Key, Value> to
    Vec<KeyValue> and with_attributes_map method is removed from SpanBuilder.
    This implies that OpenTelemetry API will no longer perform
    de-dup of attribute Keys.
    #​1293.
    Please share feedback
    here
    , if
    you are affected.

v0.20.0

Compare Source

This release should been seen as 1.0-rc3 following 1.0-rc2 in v0.19.0. Refer to CHANGELOG.md in individual creates for details on changes made in different creates.

Added
  • Add new method to BoxedTracer #​1009
  • Add js-sys as dependency for api crate when building wasm targets #​1078
  • Create tracer using a shared instrumentation library #​1129
  • Add Context::map_current #​1140
  • Add unit/doc tests for metrics #​1213
  • Add opentelemetry::sdk::logs::config() for parity with opentelemetry::sdk::trace::config() (#​1197)
Changed
  • OtelString::Owned carries Box<str> instead of String #​1096
Removed
  • Drop include_trace_context parameter from Logs API/SDK. #​1133
  • Synchronous instruments no longer accepts Context while reporting
    measurements. #​1076.
  • Fallible conversions from futures-channel error types to LogError and
    TraceError removed.
    #​1201
Fixed
  • Fix SpanRef::set_attributes mutability requirement. #​1038
  • Move OrderMap module to root of otel-api crate. #​1061
  • Use the browser-only js-sys workaround only when actually targeting a browser #​1008

v0.19.0

Compare Source

This release should been seen as 1.0-rc2 following 1.0-rc1 in v0.18.0. Refer to CHANGELOG.md in individual creates for details on changes made in different creates.

Added
  • Add WithContext to public api #​893.
  • Add support for instrumentation scope attributes #​1021.
Changed
  • Implement Display on Baggage #​921.
  • Bump MSRV to 1.57 #​953.
  • Update dependencies and bump MSRV to 1.60 #​969.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

kodiakhq[bot]
kodiakhq bot previously approved these changes Jun 6, 2024
@renovate renovate bot force-pushed the renovate/opentelemetry-rust-monorepo branch from d3006b3 to 5b65fe0 Compare July 15, 2024 19:33
@renovate renovate bot changed the title deps: update rust crate opentelemetry to 0.23 deps: update rust crate opentelemetry to 0.24 Jul 15, 2024
kodiakhq[bot]
kodiakhq bot previously approved these changes Jul 15, 2024
@renovate renovate bot force-pushed the renovate/opentelemetry-rust-monorepo branch from 5b65fe0 to 9e3f4c9 Compare September 9, 2024 22:44
@renovate renovate bot changed the title deps: update rust crate opentelemetry to 0.24 deps: update rust crate opentelemetry to 0.25 Sep 9, 2024
kodiakhq[bot]
kodiakhq bot previously approved these changes Sep 9, 2024
@renovate renovate bot force-pushed the renovate/opentelemetry-rust-monorepo branch from 9e3f4c9 to ab9bcea Compare October 1, 2024 22:43
@renovate renovate bot changed the title deps: update rust crate opentelemetry to 0.25 deps: update rust crate opentelemetry to 0.26 Oct 1, 2024
Copy link
Contributor Author

renovate bot commented Oct 1, 2024

⚠️ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path crates/mqtt-client/Cargo.toml --package [email protected] --precise 0.29.0
    Updating crates.io index
error: failed to select a version for the requirement `opentelemetry = "^0.18"`
candidate versions found which didn't match: 0.29.0
location searched: crates.io index
required by package `mqtt-light v0.0.0 (/tmp/renovate/repos/github/YoloDev/hass-rs/examples/mqtt-light)`

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path crates/mqtt-provider-paho/Cargo.toml --package [email protected] --precise 0.29.0
    Updating crates.io index
error: failed to select a version for the requirement `opentelemetry = "^0.18"`
candidate versions found which didn't match: 0.29.0
location searched: crates.io index
required by package `mqtt-light v0.0.0 (/tmp/renovate/repos/github/YoloDev/hass-rs/examples/mqtt-light)`

kodiakhq[bot]
kodiakhq bot previously approved these changes Oct 1, 2024
@renovate renovate bot force-pushed the renovate/opentelemetry-rust-monorepo branch from ab9bcea to b8cea47 Compare November 12, 2024 00:51
@renovate renovate bot changed the title deps: update rust crate opentelemetry to 0.26 deps: update rust crate opentelemetry to 0.27 Nov 12, 2024
kodiakhq[bot]
kodiakhq bot previously approved these changes Nov 12, 2024
@renovate renovate bot force-pushed the renovate/opentelemetry-rust-monorepo branch from b8cea47 to f8bbb45 Compare February 10, 2025 22:08
@renovate renovate bot changed the title deps: update rust crate opentelemetry to 0.27 deps: update rust crate opentelemetry to 0.28 Feb 10, 2025
kodiakhq[bot]
kodiakhq bot previously approved these changes Feb 10, 2025
@renovate renovate bot force-pushed the renovate/opentelemetry-rust-monorepo branch from f8bbb45 to a5b115a Compare March 22, 2025 01:44
@renovate renovate bot changed the title deps: update rust crate opentelemetry to 0.28 deps: update rust crate opentelemetry to 0.29 Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants