fix(deps): update rust crate opentelemetry_sdk to 0.32.0 [security]#3569
Open
renovate[bot] wants to merge 1 commit into
Open
fix(deps): update rust crate opentelemetry_sdk to 0.32.0 [security]#3569renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/crate-opentelemetry_sdk-vulnerability
branch
15 times, most recently
from
June 27, 2026 19:00
2ca7b4a to
a4c4669
Compare
|
Action required: PR inactive for 5 days. |
renovate
Bot
force-pushed
the
renovate/crate-opentelemetry_sdk-vulnerability
branch
5 times, most recently
from
July 13, 2026 22:17
cdaa4b7 to
e86108c
Compare
renovate
Bot
force-pushed
the
renovate/crate-opentelemetry_sdk-vulnerability
branch
from
July 14, 2026 02:35
e86108c to
4f38fbd
Compare
renovate
Bot
force-pushed
the
renovate/crate-opentelemetry_sdk-vulnerability
branch
from
July 14, 2026 03:00
4f38fbd to
80d7872
Compare
|
Action required: PR inactive for 5 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.23.0→0.32.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
opentelemetry_sdk has unbounded memory allocation in W3C Baggage propagation
CVE-2026-48504 / GHSA-w9wp-h8wv-79jx
More information
Details
Summary
BaggagePropagator::extract_with_contextinopentelemetry_sdkdid not enforce the W3C Baggage size limits before parsing an inboundbaggageheader. A large attacker-controlled header could cause unnecessary CPU work and short-lived heap allocations while parsing entries that would later be discarded by the SDK's baggage storage limits.The SDK now applies limits aligned with the W3C Baggage limits:
Impact
Services that accept untrusted inbound propagation headers may experience increased per-request resource usage when processing oversized
baggageheaders. This can contribute to denial-of-service risk, especially when application or transport-level header limits are absent or configured above the W3C Baggage limits.The impact is limited to availability. This issue does not expose telemetry data, modify telemetry data, or allow code execution.
Patches
Upgrade
opentelemetry_sdkto version0.32.1or later.Version
0.32.1rejectsbaggageheader values larger than 8192 bytes and limits extraction to the first 64 list-members.Workarounds
If upgrading immediately is not possible, reject or limit inbound
baggageheaders larger than 8192 bytes before invoking OpenTelemetry propagation extraction. This can be enforced at a proxy, gateway, middleware layer, or custom carrier boundary.Resources
Credit
tonghuaroot
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
open-telemetry/opentelemetry-rust (opentelemetry_sdk)
v0.32.1Released 2026-May-23
BaggagePropagatornow enforces the W3C Baggage maximum header length(8192 bytes) and maximum list-member count (64) when extracting an inbound
baggageheader. Headers exceeding 8192 bytes are dropped at thepropagator boundary; headers with more than 64 list members are
truncated to the first 64 entries. The change keeps the propagator from
parsing attacker-controlled input beyond the W3C limits instead of doing
per-entry parse, decode, and allocation work only to discard the excess
on
Baggageinsert. See https://www.w3.org/TR/baggage/#limits.SimpleSpanProcessortelemetry suppression added in 0.32.0(see #3494), which caused a
RefCell already borrowedpanic when a spanwas started and dropped inside a
get_active_span(orContext::map_current)closure. Tracked in #3510. A proper fix for the underlying
Context::map_currentre-entrancy will be investigated separately, afterwhich the suppression can be safely re-applied.
name(set viaStream::builder().with_name(...))is no longer validated against the instrument name syntax, per
spec clarification.
unitand other stream parameters continue to be validated.v0.32.0Compare Source
Released 2026-May-08
SimpleSpanProcessornow suppresses telemetry during export, preventingtelemetry-induced-telemetry feedback loops. This aligns with the existing
behavior in
BatchSpanProcessorandSimpleLogProcessor.SimpleConcurrentLogProcessorand theexperimental_logs_concurrent_log_processorfeature flag. The use cases it was designed for (ETW/user_events exporters) are
better served by modeling those exporters as processors directly.
Counter::bind()andHistogram::bind()SDK implementations thatreturn pre-bound measurement handles (
BoundCounter<T>,BoundHistogram<T>).Bound instruments resolve the attribute-to-aggregator mapping once at bind time
and cache the result, eliminating per-call HashMap lookups. View attribute
filtering is applied at bind time so the hot path stays free of per-call
attribute processing. Bound and unbound recordings with the same (post-view)
attribute set always aggregate into the same data point, including the empty
attribute set. Bound entries are never evicted during delta collection while
a handle exists — idle cycles produce no export but the tracker persists. If
bind()is called at the cardinality limit, the handle binds directly tothe overflow tracker — its writes stay on the same direct (no-lookup) hot
path and consistently land in the
otel.metric.overflow=truebucket forthe lifetime of the handle. To recover a bound handle after delta collection
frees space, drop the existing handle and call
bind()again. Gated behindthe
experimental_metrics_bound_instrumentsfeature flag. Benchmarks show~28x speedup for counter operations and ~9x for histograms.
HashMap on every collect cycle. Stale attribute sets that received no measurements
since the last collection are evicted. Note: recovery from cardinality overflow
now requires 2 collect cycles — the first marks entries as stale, the second
evicts them.
testingfeature is now runtime agnostic. #3407TokioSpanExporterandnew_tokio_test_exporterhave been renamed toTestSpanExporterandnew_test_exporter.tokio/rt,tokio/time,tokio/macros,tokio/rt-multi-thread,tokio-stream,experimental_async_runtimeInstrumentationScopeinArcinternally inSdkTracer, making tracer clones cheaper (Arc refcount increment instead of deep copy).portable-atomicforAtomicI64andAtomicU64in the metrics module. This enables compilation on 32-bit ARM targets (e.g.,armv5te-unknown-linux-gnueabi,armv7-unknown-linux-gnueabihf).Aggregationenum andStreamBuilder::with_aggregation()are now stable and no longer require thespec_unstable_metrics_viewsfeature flag.service.nameResource attribute fallback to follow OpenTelemetryspecification by using
unknown_service:<process.executable.name>format whenservice name is not explicitly configured. Previously, it only used
unknown_service.SpanExporter::shutdown()default timeout from 5 nanoseconds to 5 seconds.SpanExportertrait methodsshutdown,shutdown_with_timeout, andforce_flushnow take&selfinstead of&mut selffor consistency withLogExporterandPushMetricExporter. Implementers using interior mutability (e.g.,Mutex,AtomicBool) require no changes.Resource::get_ref(&self, key: &Key) -> Option<&Value>to allow retrieving a reference to a resource value without cloning.SdkTracer#3227:id_generator,should_sampleopentelemetry::tracetoopentelemetry_sdk::trace#3277:SamplingDecision,SamplingResultopentelemetry_sdk::traceinstead.StreamBuilder::build()now rejectsusize::MAXas a cardinality limitwith a validation error. #3506
TracerProviderBuilder::with_samplerallows to pass boxed instance ofShouldSample[#3313][3313]SpanProcessor::on_endcallsContext::current()(#3262).SpanProcessor::on_enddocumentation to clarify thatContext::current()returns the parent context, not the span's contexttraceparentheaders with unknown flags (e.g. W3C random-trace-id flag0x02) being incorrectly rejected. Unknown flags are now accepted and zeroed out as required by the W3C trace-context spec. #3435InMemoryExporterErrorhas been removed and replaced byOTelSdkError, and a newJaegerRemoteSamplerBuildErrorintroduced to replace last uses ofTraceError. #3458backing specification) is now stable and is enabled by default. #3278
v0.31.0Compare Source
Released 2025-Sep-25
Updated
opentelemetryandopentelemetry-httpdependencies to version 0.31.0.Feature: Add span flags support for
isRemoteproperty in OTLP exporter (#3153)Updated span and link transformations to properly set flags field (0x100 for local, 0x300 for remote)
TODO: Placeholder for Span processor related things
Fix: Restore true parallel exports in the async-native
BatchSpanProcessorby honoringOTEL_BSP_MAX_CONCURRENT_EXPORTS(#2959). A regression in #2685 inadvertently awaited theexport()future directly inopentelemetry-sdk/src/trace/span_processor_with_async_runtime.rsinstead of spawning it on the runtime, forcing all exports to run sequentially.Feature: Added
Cloneimplementation toSdkLoggerfor API consistency withSdkTracer(#3058).Fix: batch size accounting in BatchSpanProcessor when queue is full (#3089).
Fix: Resolved dependency issue where the "logs" feature incorrectly
required the "trace" feature flag
(#3096).
The logs functionality now operates independently, while automatic correlation
between logs and traces continues to work when the "trace" feature is
explicitly enabled.
Fix: Fix shutdown of
SimpleLogProcessorand asyncBatchLogProcessor.Default implementation of
LogProcessor::shutdown_with_timeout()will now warn to encourage users to implement proper shutdown.v0.30.0Compare Source
Released 2025-May-23
Updated
opentelemetryandopentelemetry-httpdependencies to version 0.30.0.It is now possible to add links to a
Spanvia theSpanRefthat you get froma
Context. 2959Feature: Added context based telemetry suppression. #2868
SdkLogger,SdkTracermodified to respect telemetry suppression based onContext. In other words, if the current context has telemetry suppressionenabled, then logs/spans will be ignored.
components to prevent telemetry from itself being fed back into OTel.
BatchLogProcessor,BatchSpanProcessor, andPeriodicReadermodified to setthe suppression flag in their dedicated thread, so that telemetry generated from
those threads will not be fed back into OTel.
SimpleLogProcessoralso modified to suppress telemetry before invoking exporters.
Feature: Implemented and enabled cardinality capping for Metrics by
default. #2901
configurability but has now been reintroduced with the ability to configure
the limit.
trueinstead of the string
"true".#2878
The
shutdown_with_timeoutmethod is added to SpanProcessor, SpanExporter trait and TracerProvider.The
shutdown_with_timeoutmethod is added to LogExporter trait.The
shutdown_with_timeoutmethod is added to LogProvider and LogProcessor trait.Breaking
MetricError,MetricResultno longer public (except whenspec_unstable_metrics_viewsfeature flag is enabled).OTelSdkResultshouldbe used instead, wherever applicable. #2906
Breaking change, affecting custom
MetricReaderauthors:shutdown_with_timeoutmethod is added toMetricReadertrait.collectmethod on
MetricReadermodified to returnOTelSdkResult.#2905
MetricReadertrait,
ManualReaderstruct,Pipelinestruct,InstrumentKindenum movedbehind feature flag "experimental_metrics_custom_reader".
#2928
Views improvements:
name, unit, description, and cardinality limit of a metric via views without
enabling the
spec_unstable_metrics_viewsfeature flag. Advanced viewfeatures, such as custom aggregation or attribute filtering, still require
the
spec_unstable_metrics_viewsfeature.new_view()method andViewtrait. Views can now be added by passinga function with signature
Fn(&Instrument) -> Option<Stream>to thewith_viewmethod on
MeterProviderBuilder.Introduced a builder pattern for
Streamcreation to use with views:StreamBuilderstruct with methods to configure stream propertiesStream::builder()method that returns a newStreamBuilderStreamBuilder::build()returnsResult<Stream, Box<dyn Error>>enablingproper validation.
Example of using views to rename a metric:
Aggregationenum moved behind feature flag"spec_unstable_metrics_views". This was only required when using advanced view
capabilities.
#2928
PushMetricExporterauthors:exportmethod onPushMetricExporternow accepts&ResourceMetricsinstead of
&mut ResourceMetrics.ResourceMetricsno longer exposesscope_metricsfield, but insteadoffers
scope_metrics()method that returns an iterator over the same.ScopeMetricsno longer exposesmetricsfield, but instead offersmetrics()method that returns an iterator over the same.Sum,Gauge,Histogram&ExponentialHistogramno longer exposesdata_pointsfield, but instead offersdata_points()method that returnsan iterator over the same.
SumDataPoint,GaugeDataPoint,HistogramDataPoint&ExponentialHistogramDataPointno longer exposesattributes,exemplarsfield, but instead offers
attributes(), andexemplars()method thatreturns an iterator over the same.
Exemplarno longer exposesfiltered_attributesfield, but insteadoffers
filtered_attributes()method that returns an iterator overthe same.
HistogramDataPointno longer exposesboundsandbucket_counts, butinstead offers
bounds()andbucket_counts()methods that returns aniterator over the same.
Metricno longer exposesname,description,unit,datafields, butinstead offers
name(),description(),unit(), anddata()accessor methods.ResourceMetricsno longer exposesresourcefield, but instead offersa
resource()accessor method.ScopeMetricsno longer exposesscopefield, but instead offersa
scope()accessor method.v0.29.0Compare Source
Released 2025-Mar-21
opentelemetrydependency to 0.29.opentelemetry-httpdependency to 0.29.Runtimetrait has been simplified and refined. See the #2641for the changes.
async-stdsupport forRuntime, asasync-stdcrate is deprecated.MeterProviderBuilder::with_resource,TracerProviderBuilder::with_resource,LoggerProviderBuilder::with_resourceare now additive (#2677).ExportErrortrait fromopentelemetry::trace::ExportErrortoopentelemetry_sdk::export::ExportErrorTraceErrorenum fromopentelemetry::trace::TraceErrortoopentelemetry_sdk::trace::TraceErrorTraceResulttype alias fromopentelemetry::trace::TraceResulttoopentelemetry_sdk::trace::TraceResultforce_flush()inPushMetricExportersynchronousSpanExportertrait method signature:to
This affects anyone who writes custom exporters, as custom implementations of SpanExporter
should now define export as an
async fn:Breaking The SpanExporter::export() method no longer requires a mutable reference to self.
Before:
After:
Custom exporters will need to internally synchronize any mutable state, if applicable.
Breaking The
shutdown_with_timeoutmethod is added to MetricExporter trait. This is breaking change for customMetricExporterauthors.Bug Fix:
BatchLogProcessornow correctly callsshutdownon the exporterwhen its
shutdownis invoked.Reduced some info level logs to debug
Breaking for custom LogProcessor/Exporter authors: Changed
nameparameter from
&strtoOption<&str>inevent_enabledmethod on theLogProcessorandLogExportertraits.SdkLoggerno longer passes itsscopename but instead passes the incomingnamewhen invokingevent_enabledon processors.Breaking for custom LogExporter authors:
shutdown()method inLogExportertrait no longer requires a mutable ref toself. If the exporterneeds to mutate state, it should rely on interior mutability.
2764
Breaking (Affects custom Exporter/Processor authors only) Removed
opentelemetry_sdk::logs::error::{LogError, LogResult}. These were notintended to be public. If you are authoring custom processor/exporters, use
opentelemetry_sdk::error::OTelSdkErrorandopentelemetry_sdk::error::OTelSdkResult.2790
Breaking for custom
LogProcessorauthors: Changedset_resourceto require mutable ref.
fn set_resource(&mut self, _resource: &Resource) {}Breaking: InMemoryExporter's return type change.
TraceResult<Vec<SpanData>>toResult<Vec<SpanData>, InMemoryExporterError>MetricResult<Vec<ResourceMetrics>>toResult<Vec<ResourceMetrics>, InMemoryExporterError>LogResult<Vec<LogDataWithResource>>toResult<Vec<LogDataWithResource>, InMemoryExporterError>v0.28.0Compare Source
Released 2025-Feb-10
Note: Due to the large amount of making changes, check migration guide to
0.28 for a summary that can help majority users to
quickly migrate. The changelog below is the full list of changes.
Update
opentelemetrydependency to 0.28.Update
opentelemetry-httpdependency to 0.28.Bump msrv to 1.75.0.
Bug fix: For cumulative temporality, ObservableGauge no longer export
MetricPoints unless measurements were newly reported (in Observable callbacks)
since last export. This bug fixes ensures ObservableGauge behaves as per OTel
Spec. The bug is not addressed for other Observable instruments
#2213
Upgrade the tracing crate used for internal logging to version 0.1.40 or
later. This is necessary because the internal logging macros utilize the name
field as metadata, a feature introduced in version 0.1.40.
#2418
Feature: Introduced a new feature flag,
experimental_metrics_disable_name_validation, which disables entireInstrument Name Validation. This is an experimental feature to unblock use
cases requiring currently disallowed characters (eg: Windows Perf Counters).
Use caution when enabling this feature as this breaks guarantees about metric
name.
Bug fix: Empty Tracer names are retained as-is instead of replacing with
"rust.opentelemetry.io/sdk/tracer"
#2486
Update
EnvResourceDetectorto allow resource attribute values containingequal signs (
"=").#2120
ResourceDetector.detect()no longer supports timeout option.Breaking Resource.get() modified to require reference to Key instead of
owned. Replace
get(Key::from_static_str("key"))withget(&Key::from_static_str("key"))Feature: Add
ResourceBuilderfor an easy way to create newResourcesBreaking: Remove
Resource::{new,empty,from_detectors,new_with_defaults,from_schema_url,merge,default}.To create Resources you should only use
Resource::builder()orResource::builder_empty(). See#2322 for a migration guide.
Example Usage:
Breaking :
#2314
impacts custom exporter and processor developers by requiring updates to
code that directly accessed LogRecord fields. They must now use the provided
getter methods (e.g.,
log_record.event_name()instead oflog_record.event_name).Breaking (Affects custom metric exporter authors only)
start_timeandtimeis moved from DataPoints to aggregations (Sum, Gauge, Histogram,ExpoHistogram) see
#2377 and
#2411, to
reduce memory.
Breaking
start_timeis no longer optional forSumaggregation, see#2367, but
is still optional for
Gaugeaggregation see#2389.
SimpleLogProcessor modified to be generic over
LogExporterto avoiddynamic dispatch to invoke exporter. If you were using
with_simple_exporterto addLogExporterwith SimpleLogProcessor, this isa transparent change.
#2338
Breaking
opentelemetry::global::shutdown_tracer_provider()removed from the API,should now use
tracer_provider.shutdown()see#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 instrumentationsand other components can obtain tracers from
global::tracer(). Thetracer_provider must be kept around to call shutdown on it at the end of
application (ex:
tracer_provider.shutdown())Breaking The LogExporter::export() method no longer requires a mutable
reference to self.: Before:
async fn export(&mut self, _batch: LogBatch<'_>) -> LogResult<()>After:async fn export(&self, _batch: LogBatch<'_>) -> LogResult<()>Custom exporters will need to internally synchronize anymutable state, if applicable.
Breaking Removed the following deprecated struct:
This structure is no longer utilized within the SDK, and users should not have
dependencies on it.
Breaking Removed the following deprecated methods:
Logger::provider(): Previously deprecated in version 0.27.1Logger::instrumentation_scope(): Previously deprecated in version 0.27.1.Migration Guidance: - These methods were intended for log appender authors.
Keep the clone of the provider handle, instead of depending on above
methods.
Rename
opentelemetry_sdk::logs::Buildertoopentelemetry_sdk::logs::LoggerProviderBuilder.Rename
opentelemetry_sdk::trace::Buildertoopentelemetry_sdk::trace::SdkTracerProviderBuilder.Redesigned PeriodicReader, BatchSpanProcessor, BatchLogProcessor to no longer
require an async runtime. They create its own background thread instead. When
pairing with OTLP,
grpc-tonicorreqwest-blocking-clientare the onlysupported features (
hyper,reqwestare not supported) These are nowenabled by default and can be migrated to by removing the extra
rt:Runtimeargument as shown below.
PeriodicReader::builder(exporter,runtime::Tokio).build();toPeriodicReader::builder(exporter).build();.with_batch_exporter(exporter, runtime::Tokio)to.with_batch_exporter(exporter)The new implementation has following limitations:
hyper,reqwestHTTP Clientswith_max_concurrent_exportsis not supported). This existed only for traces.
If this applies to you, you can get the old behavior back by following steps
below:
experimental_metrics_periodicreader_with_async_runtimeexperimental_logs_batch_log_processor_with_async_runtimeexperimental_trace_batch_span_processor_with_async_runtimeperiodic_reader_with_async_runtime::PeriodicReader,log_processor_with_async_runtime::BatchLogProcessorandspan_processor_with_async_runtime::BatchSpanProcessorrt-tokio,rt-tokio-current-thread, orrt-async-std.As part of the above redesign of PeriodicReader and BatchProcessors, these
components no longer enforce timeout themselves and instead relies on
Exporters to enforce own timeouts. In other words, the following are no longer
supported.
with_max_export_timeout,with_timeoutmethods onBatchConfigBuilder,PeriodicReaderBuilderOTEL_BLRP_EXPORT_TIMEOUT,OTEL_BSP_EXPORT_TIMEOUTUsers are advised to configure timeout on the Exporters itself. For example,
in the OTLP exporter, the export timeout can be configured using:
OTEL_EXPORTER_OTLP_TIMEOUTOTEL_EXPORTER_OTLP_LOGS_TIMEOUT,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT.with_tonic().with_timeout()or.with_http().with_timeout().Breaking Introduced
experimental_async_runtimefeature forruntime-specific traits.
rt-tokio,rt-tokio-current-thread, andrt-async-std) now depend on theexperimental_async_runtimefeature.rt-tokio,rt-tokio-current-thread, orrt-async-stdwill automaticallyenable the
experimental_async_runtimefeature.experimental_async_runtime
feature in your Cargo.toml and implement the requiredRuntime` traits.Removed Metrics Cardinality Limit feature. This was originally introduced in
#1066 with a
hardcoded limit of 2000 and no ability to change it. This feature will be
re-introduced in a future date, along with the ability to change the cardinality
limit.
Breaking Removed unused
opentelemetry_sdk::Errorenum.Breaking (Affects custom Exporter authors only) Moved
ExportErrortraitfrom
opentelemetry::export::ExportErrortoopentelemetry_sdk::ExportErrorBreaking (Affects custom SpanExporter, SpanProcessor authors only): Rename
namespaces for Span exporter structs/traits before:
opentelemetry_sdk::export::spans::{ExportResult, SpanData, SpanExporter};now:
opentelemetry_sdk::trace::{ExportResult, SpanData, SpanExporter};Breaking (Affects custom LogExporter, LogProcessor authors only): Rename
namespaces for Log exporter structs/traits. before:
opentelemetry_sdk::export::logs::{ExportResult, LogBatch, LogExporter};now:opentelemetry_sdk::logs::{ExportResult, LogBatch, LogExporter};Breaking
opentelemetry_sdk::LogRecord::default()method is removed. Theonly way to create log record outside opentelemetry_sdk crate is using
Logger::create_log_record()method.Breaking: Rename namespaces for InMemoryExporters. (The module is still
under "testing" feature flag)
before:
now:
Breaking Renamed
LoggerProvider,LoggerandLogRecordtoSdkLoggerProvider,SdkLoggerandSdkLogRecordrespectively to avoid namecollision with public API types.
#2612
Breaking Renamed
TracerProviderandTracertoSdkTracerProviderandSdkTracerto avoid name collision with public API types.Traceris stilltype-aliased to
SdkTracerto keep back-compat with tracing-opentelemetry.#2614
Breaking Providers, Exporters, Processors, and Readers are modified to use a
unified Result type for
export(),force_flush(), andshutdown()methods.All these methods now use
OTelSdkResultas their return type. Following PRsshow the exact changes:
2613
2625
2604
2606
2573
v0.27.1Compare Source
Released 2024-Nov-27
DEPRECATED:
trace::Configmethods are moving ontoTracerProviderBuilder to be consistent with other signals. See #2303 for migration guide.trace::Configis scheduled to be removed from public API inv0.28.0.example:
logs::LogDatastruct is deprecated, and scheduled to be removed from public API inv0.28.0.Bug fix: Empty Meter names are retained as-is instead of replacing with
"rust.opentelemetry.io/sdk/meter"
#2334
Bug fix: Empty Logger names are retained as-is instead of replacing with
"rust.opentelemetry.io/sdk/logger"
#2316
Logger::provider: This method is deprecated as of version0.27.1. To be removed in0.28.0.Logger::instrumentation_scope: This method is deprecated as of version0.27.1. To be removed in0.28.0Migration Guidance:
- These methods are intended for log appenders. Keep the clone of the provider handle, instead of depending on above methods.
Bug Fix: Validates the
with_boundariesbucket boundaries used inHistograms. The boundaries provided by the user must not contain
f64::NAN,f64::INFINITYorf64::NEG_INFINITYand must be sorted in strictlyincreasing order, and contain no duplicates. Instruments will not record
measurements if the boundaries are invalid.
#2351
Added
with_periodic_exportermethod toMeterProviderBuilder, allowingusers to easily attach an exporter with a PeriodicReader for automatic metric
export. Retained with_reader() for advanced use cases where a custom
MetricReader configuration is needed.
2597
Example Usage:
Using a custom PeriodicReader (advanced use case):
let reader = PeriodicReader::builder(exporter).build();
SdkMeterProvider::builder()
.with_reader(reader)
.build();
v0.27.0Compare Source
Released 2024-Nov-11
Update
opentelemetrydependency version to 0.27Update
opentelemetry-httpdependency version to 0.27Bump MSRV to 1.70 #2179
Implement
LogRecord::set_trace_contextforLogRecord. Respect any trace context set on aLogRecordwhen emitting through aLogger.Improved
LoggerProvidershutdown handling to prevent redundant shutdown calls whendropis invoked. #2195When creating new metric instruments by calling
build(), SDK would return a no-op instrument if the validation fails (eg: Invalid metric name). #2166BREAKING for Metrics users:
{Delta,Cumulative}TemporalitySelector::new()in favor of directly usingTemporalityenum to simplify the configuration of MetricsExporterBuilder with different temporalities.(#2232): The
initmethod used to create instruments has been renamed tobuild.Before:
Now:
(#2255): de-pluralize Metric types.
PushMetricsExporter->PushMetricExporterInMemoryMetricsExporter->InMemoryMetricExporterInMemoryMetricsExporterBuilder->InMemoryMetricExporterBuilderBREAKING: #2220
InstrumentationLibraryre-export and itsScopealias, useopentelemetry::InstrumentationLibraryinstead.LoggerProvider::versioned_logger,TracerProvider::versioned_tracerMeterProvider::versioned_meterLoggerProvider::logger_with_scope,TracerProvider::logger_with_scope,MeterProvider::meter_with_scope#2272
2.5.2. The higher version breaks the build refer: servo/rust-url#992.The
urlcrate is used whenjaeger_remote_samplerfeature is enabled.BREAKING: #2266
Moved
ExportErrortrait fromopentelemetry::ExportErrortoopentelemetry_sdk::export::ExportErrorMoved
LogErrorenum fromopentelemetry::logs::LogErrortoopentelemetry_sdk::logs::LogErrorMoved
LogResulttype alias fromopentelemetry::logs::LogResulttoopentelemetry_sdk::logs::LogResultRenamed
opentelemetry::metrics::Resulttype alias toopentelemetry::metrics::MetricResultRenamed
opentelemetry::metrics::MetricsErrorenum toopentelemetry::metrics::MetricErrorMoved
MetricErrorenum fromopentelemetry::metrics::MetricErrortoopentelemetry_sdk::metrics::MetricErrorMoved
MetricResulttype alias fromopentelemetry::metrics::MetricResulttoopentelemetry_sdk::metrics::MetricResultUsers calling public APIs that return these constructs (e.g, LoggerProvider::shutdown(), MeterProvider::force_flush()) should now import them from the SDK instead of the API.
Developers creating custom exporters should ensure they import these constructs from the SDK, not the API.
2291 Rename
logs_level_enabled flagtospec_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.BREAKING:
Temporalityenum moved fromopentelemetry_sdk::metrics::data::Temporalitytoopentelemetry_sdk::metrics::Temporality.BREAKING:
Viewsare now an opt-in ONLY feature. Please include the featurespec_unstable_metrics_viewsto enableViews. It will be stabilized post 1.0 stable release of the SDK. #2295Added a new
PeriodicReaderimplementation (PeriodicReaderWithOwnThread)that does not rely on an async runtime, and instead creates own Thread. This
is under feature flag "experimental_metrics_periodic_reader_no_runtime". The
functionality maybe moved into existing PeriodReader or even removed in the
future. As of today, this cannot be used as-is with OTLP Metric Exporter or
any exporter that require an async runtime.
v0.26.0Compare Source
Released 2024-Sep-30
Update
opentelemetrydependency version to 0.26BREAKING Public API changes:
SdkMeterstruct #2113. This API is only meant for internal use.AggregationSelectortrait andDefaultAggregationSelectorstruct #2085. This API was unnecessary. The feature to customize aggregation for instruments should be offered byViewsAPI.Update
async-stddependency version to 1.13Breaking - Remove support for
MetricProducerwhich allowed metrics fromexternal sources to be sent through OpenTelemetry.
#2105
Feature:
SimpleSpanProcessor::newis now public #2119For Delta Temporality, exporters are not invoked unless there were new
measurements since the last collect/export.
#2153
MeterProvidermodified to not invoke shutdown onDrop, if user has alreadycalled
shutdown().#2156
v0.25.0Compare Source
Update
opentelemetrydependency version to 0.25Starting with this version, this crate will align with
opentelemetrycrateon major,minor versions.
Perf improvements for all metric instruments (except
ExponentialHistogram) that led to faster metric updates and higher throughput #1740:Mutex. The internal aggregation data structure now uses a combination ofRwLockand atomics. Consequently, threads reporting measurements now only have to acquire a read lock.f64based metrics no longer need to acquire aMutexto update thef64value. They use a CAS-based loop instead.opentelemetry_sdk::logs::record::LogRecordandopentelemetry_sdk::logs::record::TraceContextderive fromPartialEqto facilitate Unit Testing.Fixed an issue causing a panic during shutdown when using the
TokioCurrentThreadin BatchExportProcessor for traces and logs.#1964
#1973
Fix BatchExportProcessor for traces and logs to trigger first export at the
first interval instead of doing it right away.
#1970
#1973
Hide LogRecord attributes Implementation Details from processors and exporters.
The custom exporters and processors can't directly access the
LogData::LogRecord::attributes, asthese are private to opentelemetry-sdk. Instead, they would now use LogRecord::attributes_iter()
method to access them.
Fixed various Metric aggregation bug related to
ObservableCounter,UpDownCounter including
#1517.
#2004
Fixed a bug related to cumulative aggregation of
Gaugemeasurements.#1975.
#2021
Provide default implementation for
event_enabledmethod inLogProcessortrait that returns
truealways.Breaking #2041
and #2057
The Exporter::export() interface is modified as below:
Previous Signature:
Updated Signature:
where
This change enhances performance by reducing unnecessary heap allocations and maintains object safety, allowing for more efficient handling of log records. It also simplifies the processing required by exporters. Exporters no longer need to determine if the LogData is borrowed or owned, as they now work directly with references. As a result, exporters must explicitly create a copy of LogRecord and/or InstrumentationLibrary when needed, as the new interface only provides references to these structures.
v0.24.1Compare Source
v0.24.0Add "metrics", "logs" to default features. With this, default feature list is
"trace", "metrics" and "logs".
Add
with_resourceon Builder for LoggerProvider, replacing thewith_configmethod. Instead of using
.with_config(Config::default().with_resource(RESOURCE::default()))usersmust now use
.with_resource(RESOURCE::default())to configure Resource onlogger provider.
Removed dependency on
ordered-float.Removed
XrayIdGenerator, which was marked deprecated since 0.21.3. Useopentelemetry-aws, version0.10.0 or newer.
Performance Improvement - Counter/UpDownCounter instruments internally use
RwLockinstead ofMutexto reduce contentionBreaking 1726
Update
LogProcessor::emit()method to take mutable reference to LogData. This is breakingchange for LogProcessor developers. If the processor needs to invoke the exporter
asynchronously, it should clone the data to ensure it can be safely processed without
lifetime issues. Any changes made to the log data before cloning in this method will be reflected in the next log processor in the chain, as well as to the exporter.
Breaking 1726
Update
LogExporter::export()method to accept a batch of log data, which can be either areference or owned
LogData. If the exporter needs to process the log dataasynchronously, it should clone the log data to ensure it can be safely processed without
lifetime issues.
Clean up public methods in SDK.
TracerProvider::span_processors] and [TracerProvider::config] was removed as it's not part of the spec.non_exhaustiveannotation to [trace::Config]. Marked [config] as deprecated since it's only a wrapper forConfig::defaultTracer::tracer_provider] and [Tracer::instrument_libraries] as it's not part of the spec.Breaking #1830 [Traces SDK] Improves
performance by sending Resource information to processors (and exporters) once, instead of sending with every log. If you are an author
of Processor, Exporter, the following are BREAKING changes.
set_resourcemethod in your custom SpanProcessor, which invokes exporter'sset_resource.set_resourcemethod in your custom SpanExporter. This method should save the resource objectin original or serialized format, to be merged with every span event during export.
SpanDatadoesn't have the resource attributes. TheSpanExporter::export()method needs to merge itwith the earlier preserved resource before export.
Breaking 1836
SpanProcessor::shutdownnow takes an immutable reference to self. Any reference can call shutdown on the processor. After the first call toshutdownthe processor will not process any new spans.Breaking [1850] (#1850)
LoggerProvider::log_processors()andLoggerProvider::resource()are not public methods anymore. They are only used within theopentelemetry-sdkcrate.1857 Fixed an issue in Metrics SDK which prevented export errors from being send to global error handler. With the fix, errors occurring during export like OTLP Endpoint unresponsive shows up in stderr by default.
1869 Added a
targetfield toLogRecordstructure, populated byopentelemetry-appender-tracingandopentelemetry-appender-logappenders.where
LogRecordwithinLogDatanow includes:The
LogRecord::targetfield contains the actual target/component emitting the logs, while theInstrumentation::namecontains the name of the OpenTelemetry appender.httpv1 types (viaopentelemetry-httpupdate)opentelemetrydependency version to 0.24opentelemetry-httpdependency version to 0.13Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ 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 this update again.
This PR was generated by Mend Renovate. View the repository job log.