Skip to content

fix(deps): update opentelemetry to 0.30 #4349

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

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 26, 2025

This PR contains the following updates:

Package Type Update Change
opentelemetry (source) dependencies minor 0.29 -> 0.30
opentelemetry-otlp (source) dependencies minor 0.29 -> 0.30
opentelemetry_sdk (source) dependencies minor 0.29 -> 0.30

Release Notes

open-telemetry/opentelemetry-rust (opentelemetry)

v0.30.0

Compare Source

Released 2025-May-23

#​2821 Context
based suppression capabilities added: Added the ability to prevent recursive
telemetry generation through new context-based suppression mechanisms. This
feature helps prevent feedback loops and excessive telemetry when OpenTelemetry
components perform their own operations.

New methods added to Context:

  • is_telemetry_suppressed() - Checks if telemetry is suppressed in this
    context
  • with_telemetry_suppressed() - Creates a new context with telemetry
    suppression enabled
  • is_current_telemetry_suppressed() - Efficiently checks if the current thread's context
    has telemetry suppressed
  • enter_telemetry_suppressed_scope() - Convenience method to enter a scope where telemetry is
    suppressed

These methods allow SDK components, exporters, and processors to temporarily
disable telemetry generation during their internal operations, ensuring more
predictable and efficient observability pipelines.

  • re-export tracing for internal-logs feature to remove the need of adding tracing as a dependency
open-telemetry/opentelemetry-rust (opentelemetry-otlp)

v0.30.0

Compare Source

Released 2025-May-23

  • Update opentelemetry dependency version to 0.30
  • Update opentelemetry_sdk dependency version to 0.30
  • Update opentelemetry-http dependency version to 0.30
  • Update opentelemetry-proto dependency version to 0.30
  • Update tonic dependency version to 0.13
  • Re-export tonic types under tonic_types
    2898
  • Publicly re-exported MetricExporterBuilder, SpanExporterBuilder, and
    LogExporterBuilder types, enabling users to directly reference and use these
    builder types for metrics, traces, and logs exporters.
    2966
open-telemetry/opentelemetry-rust (opentelemetry_sdk)

v0.30.0

Compare Source

Released 2025-May-23

  • Updated opentelemetry and opentelemetry-http dependencies to version 0.30.0.

  • It is now possible to add links to a Span via the SpanRef that you get from
    a Context. 2959

  • Feature: Added context based telemetry suppression. #​2868

    • SdkLogger, SdkTracer modified to respect telemetry suppression based on
      Context. In other words, if the current context has telemetry suppression
      enabled, then logs/spans will be ignored.
    • The flag is typically set by OTel
      components to prevent telemetry from itself being fed back into OTel.
    • BatchLogProcessor, BatchSpanProcessor, and PeriodicReader modified to set
      the suppression flag in their dedicated thread, so that telemetry generated from
      those threads will not be fed back into OTel.
    • Similarly, SimpleLogProcessor
      also modified to suppress telemetry before invoking exporters.
  • Feature: Implemented and enabled cardinality capping for Metrics by
    default. #​2901

    • The default cardinality limit is 2000 and can be customized using Views.
    • This feature was previously removed in version 0.28 due to the lack of
      configurability but has now been reintroduced with the ability to configure
      the limit.
    • Fixed the overflow attribute to correctly use the boolean value true
      instead of the string "true".
      #​2878
  • The shutdown_with_timeout method is added to SpanProcessor, SpanExporter trait and TracerProvider.

  • The shutdown_with_timeout method is added to LogExporter trait.

  • The shutdown_with_timeout method is added to LogProvider and LogProcessor trait.

  • Breaking MetricError, MetricResult no longer public (except when
    spec_unstable_metrics_views feature flag is enabled). OTelSdkResult should
    be used instead, wherever applicable. #​2906

  • Breaking change, affecting custom MetricReader authors:

    • The
      shutdown_with_timeout method is added to MetricReader trait.
    • collect
      method on MetricReader modified to return OTelSdkResult.
      #​2905
    • MetricReader
      trait, ManualReader struct, Pipeline struct, InstrumentKind enum moved
      behind feature flag "experimental_metrics_custom_reader".
      #​2928
  • Views improvements:

    • Core view functionality is now available by default—users can change the
      name, unit, description, and cardinality limit of a metric via views without
      enabling the spec_unstable_metrics_views feature flag. Advanced view
      features, such as custom aggregation or attribute filtering, still require
      the spec_unstable_metrics_views feature.
    • Removed new_view() method and View trait. Views can now be added by passing
      a function with signature Fn(&Instrument) -> Option<Stream> to the with_view
      method on MeterProviderBuilder.
  • Introduced a builder pattern for Stream creation to use with views:

    • Added StreamBuilder struct with methods to configure stream properties
    • Added Stream::builder() method that returns a new StreamBuilder
    • StreamBuilder::build() returns Result<Stream, Box<dyn Error>> enabling
      proper validation.

Example of using views to rename a metric:

let view_rename = |i: &Instrument| {
    if i.name() == "my_histogram" {
        Some(
            Stream::builder()
                .with_name("my_histogram_renamed")
                .build()
                .unwrap(),
        )
    } else {
        None
    }
};

let provider = SdkMeterProvider::builder()
    // add exporters, set resource etc.
    .with_view(view_rename)
    .build();
  • Breaking Aggregation enum moved behind feature flag
    "spec_unstable_metrics_views". This was only required when using advanced view
    capabilities.
    #​2928
  • Breaking change, affecting custom PushMetricExporter authors:
    • The export method on PushMetricExporter now accepts &ResourceMetrics
      instead of &mut ResourceMetrics.
    • ResourceMetrics no longer exposes scope_metrics field, but instead
      offers scope_metrics() method that returns an iterator over the same.
    • ScopeMetrics no longer exposes metrics field, but instead offers
      metrics() method that returns an iterator over the same.
    • Sum, Gauge, Histogram & ExponentialHistogram no longer exposes
      data_points field, but instead offers data_points() method that returns
      an iterator over the same.
    • SumDataPoint, GaugeDataPoint, HistogramDataPoint &
      ExponentialHistogramDataPoint no longer exposes attributes, exemplars
      field, but instead offers attributes(), and exemplars() method that
      returns an iterator over the same.
    • Exemplar no longer exposes filtered_attributes field, but instead
      offers filtered_attributes() method that returns an iterator over
      the same.
    • HistogramDataPoint no longer exposes bounds and bucket_counts, but
      instead offers bounds() and bucket_counts() methods that returns an
      iterator over the same.
    • Metric no longer exposes name, description, unit, data fields, but
      instead offers name(), description(), unit(), and data() accessor methods.
    • ResourceMetrics no longer exposes resource field, but instead offers
      a resource() accessor method.
    • ScopeMetrics no longer exposes scope field, but instead offers
      a scope() accessor method.

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 is behind base branch, 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.

Copy link
Contributor Author

renovate bot commented May 26, 2025

⚠️ Artifact update problem

Renovate failed to update an artifact 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 Cargo.toml --package opentelemetry@0.29.1 --precise 0.30.0
    Updating crates.io index
error: failed to select a version for the requirement `opentelemetry = "^0.29.0"`
candidate versions found which didn't match: 0.30.0
location searched: crates.io index
required by package `tracing-opentelemetry v0.30.0`
    ... which satisfies dependency `tracing-opentelemetry = "^0.30"` (locked to 0.30.0) of package `rustup v1.28.2 (/tmp/renovate/repos/github/rust-lang/rustup)`

@renovate renovate bot force-pushed the renovate/opentelemetry branch from 427e44b to fe4cafd Compare May 27, 2025 11:59
@djc djc closed this May 27, 2025
Copy link
Contributor Author

renovate bot commented May 27, 2025

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (0.30). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/opentelemetry branch May 27, 2025 13:26
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.

1 participant