This repository was archived by the owner on May 29, 2026. It is now read-only.
Update opentelemetry-rust monorepo#498
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
July 15, 2024 19:18
935db69 to
39d6f5b
Compare
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
August 28, 2024 08:33
39d6f5b to
c73dedb
Compare
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
September 10, 2024 00:25
c73dedb to
cf8da7b
Compare
Contributor
Author
|
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
October 2, 2024 01:42
cf8da7b to
8ce11c6
Compare
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
November 12, 2024 01:50
8ce11c6 to
9b3655d
Compare
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
November 17, 2024 16:56
9b3655d to
8103657
Compare
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
December 17, 2024 01:05
8103657 to
5e9bcd2
Compare
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
January 15, 2025 00:03
5e9bcd2 to
1173256
Compare
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
February 10, 2025 22:09
1173256 to
2f9a4f9
Compare
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
March 17, 2025 17:38
2f9a4f9 to
7f985d7
Compare
renovate
Bot
force-pushed
the
renovate/opentelemetry-rust-monorepo
branch
from
March 22, 2025 02:35
7f985d7 to
6323050
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.21.0->0.29.00.20.0->0.22.00.21.2->0.29.0Release Notes
open-telemetry/opentelemetry-rust (opentelemetry)
v0.29.0Compare Source
Released 2025-Mar-21
ExportErrortrait fromopentelemetry::trace::ExportErrortoopentelemetry_sdk::export::ExportErrorTraceErrorenum fromopentelemetry::trace::TraceErrortoopentelemetry_sdk::trace::TraceErrorTraceResulttype alias fromopentelemetry::trace::TraceResulttoopentelemetry_sdk::trace::TraceResultInstrumentationScopeimplementation forPartialEqandHashfixed to include Attributes also.BaggagefromValuetoStringValueBaggageconstants to reflect latest standard (MAX_KEY_VALUE_PAIRS- 180 -> 64,MAX_BYTES_FOR_ONE_PAIR- removed) and increased insert performance see #2284.Baggage.remove()signature with.get()to take the key as a referenceBaggagecan't be retrieved from theContextdirectly anymore and needs to be accessed viacontext.baggage()with_baggage()andcurrent_with_baggage()override any existingBaggagein theContextBaggagekeys can't be empty and only allow ASCII visual chars, except"(),/:;<=>?@​[\]{}(see RFC7230, Section 3.2.6)KeyValueMetadatadoes not publicly expose its fields. This should be transparent change to the users.Contextto use a stack to properly handle out of order dropping ofContextGuard. This imposes a limit of65535nested contexts on a single thread. See #2378 and #1887.name: Option<&str>parameter to theevent_enabledmethodon the
Loggertrait. This allows implementations (SDK, processor, exporters)to leverage this additional information to determine if an event is enabled.
v0.28.0Compare Source
Released 2025-Feb-10
opentelemetry::global::shutdown_tracer_provider()Removed from this crate, should now usetracer_provider.shutdown()see #2369 for a migration example.opentelemetry::PropagationErrorstruct.v0.27.1Compare Source
Released 2024-Nov-27
v0.27.0Compare Source
Released 2024-Nov-11
LogRecord::set_trace_context; an optional method conditional on thetracefeature for setting trace context on a log record.as_anyfromAsyncInstrumenttrait and the implementing instruments:ObservableCounter,ObservableGauge, andObservableUpDownCounter#2187SyncInstrumenttrait to replace the individual synchronous instrument traits (SyncCounter,SyncGauge,SyncHistogram,SyncUpDownCounter) which are meant for SDK implementation. #2207observemethod on asynchronous instruments can only be called inside a callback. This was done by removing the implementation ofAsyncInstrumenttrait for each of the asynchronous instruments. #2210PartialOrdandOrdimplementations forKeyValue. #2215KeyValuerelated structs and enums asnon_exhaustive. #2228AnyValueenum asnon_exhaustive. #2230initmethod used to create instruments has been renamed tobuild. Also,try_init()method is removed from instrument builders. The return types ofInstrumentProvidertrait methods modified to return the instrument struct, instead ofResult. #2227Before:
Now:
Breaking change: #2220
InstrumentationLibrary::newInstrumentationLibrarytoInstrumentationScopeInstrumentationLibraryBuildertoInstrumentationScopeBuilderLoggerProvider::versioned_loggerandTracerProvider::versioned_tracerLoggerProvider::logger_builder,TracerProvider::tracer_builderandMeterProvider::versioned_meterLoggerProvider::logger_with_scope,TracerProvider::logger_with_scope,MeterProvider::meter_with_scopeglobal::meter_with_versionwithglobal::meter_with_scopeglobal::tracer_with_scopeBreaking change: replaced
InstrumentationScopepublic attributes by getters #2275Breaking change: #2260
global::set_error_handlerandglobal::handle_error.global::handle_errorusage inside the opentelemetry crates has been replaced withglobal::otel_info,otel_warn,otel_debugandotel_errormacros based on the severity of the internal logs.global::handle_errorwas to log the error usingeprintln!. With otel macros, the internal logs get emitted viatracingmacros of matching severity. Users now need to configure atracinglayer/subscriber to capture these logs.tracing::fmtlayer.Breaking change for exporter/processor authors: #2266
ExportErrortrait fromopentelemetry::ExportErrortoopentelemetry_sdk::export::ExportErroropentelemetry::trace::ExportErrorfor trace API. This would be eventually be consolidated with ExportError in the SDK.LogErrorenum fromopentelemetry::logs::LogErrortoopentelemetry_sdk::logs::LogErrorLogResulttype alias fromopentelemetry::logs::LogResulttoopentelemetry_sdk::logs::LogResultMetricErrorenum fromopentelemetry::metrics::MetricErrortoopentelemetry_sdk::metrics::MetricErrorMetricResulttype alias fromopentelemetry::metrics::MetricResulttoopentelemetry_sdk::metrics::MetricResultThese 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 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.v0.26.0Compare 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 existingKeyValue::new()API covers all the scenarios offered by these APIs.Removed:
ObjectSafeMeterProviderandGlobalMeterProvider#2112. These APIs were unnecessary and were mainly meant for internal use.Modified:
MeterProvider.meter()andMeterProvider.versioned_meter()argument types have been updated to&'static strinstead ofimpl Into<Cow<'static, str>>>#2112. These APIs were modified to enforce the Metername,version, andschema_urlto be&'static str.Renamed:
NoopMeterCoretoNoopMeterAdded
with_boundariesAPI to allow users to provide custom bounds for Histogram instruments. #2135v0.25.0Compare Source
Before:
After:
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_callbackto provide the callback, providethem using
with_callbackmethod, while creating the Observable instrumentitself.
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.0Compare Source
Add "metrics", "logs" to default features. With this, default feature list is
"trace", "metrics" and "logs".
When "metrics" feature is enabled,
KeyValueimplementsPartialEq,Eq,PartialOrder,Order,Hash. This is meant to be used for metricsaggregation purposes only.
Removed
Unitstruct for specifying Instrument units. Unit is treated as anopaque 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.0Compare Source
Added
PropagationErrorGaugeno longer requiresotel-unstablefeature flag, as OpenTelemetry specification forGaugeinstrument is stable.Removed
urlencodingcrate dependency. #1613LoggerProviders 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.
LogRecordstruct to SDK.LogRecordtrait 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 oflogger_builder()1567.Before:
After:
versioned_tracer()in favor oftracer_builder()1567.Before:
After:
v0.22.0Compare Source
Added
#1410 Add experimental synchronous gauge. This is behind the feature flag, and can be enabled by enabling the feature
otel_unstablefor opentelemetry crate.#1410 Guidelines to add new unstable/experimental features.
Changed
AnyValue.Mapto be backed byHashMapinstead of customOrderMap,which internally used
IndexMap. There was no requirement to maintain the orderof entries, so moving from
IndexMaptoHashMapoffers slight performancegains, and avoids
IndexMapdependency. This affectsbodyandattributesofLogRecord.#1353
TextMapCompositePropagator#1373NoopLoggerto save on operations#1455
Removed
OrderMaptype as there was no requirement to use this over regularHashMap.#1353
global::shutdown_meter_provider, useSdkMeterProvider::shutdowndirectly instead #1412.
open-telemetry/opentelemetry-rust (opentelemetry-jaeger)
v0.22.0Compare Source
API
Added
https://github.com/open-telemetry/opentelemetry-rust/pull/1410 Add experimental synchronous gauge. This is behind the feature flag, and can be enabled by enabling the feature otel_unstable for opentelemetry crate.
https://github.com/open-telemetry/opentelemetry-rust/pull/1410 Guidelines to add new unstable/experimental features.
Changed
Removed
SDK
Deprecated
Added
#1410 Add experimental synchronous gauge
#1471 Configure batch log record processor via
OTEL_BLRP_*environment variables and viaOtlpLogPipeline::with_batch_config#1503 Make the documentation for In-Memory exporters visible.
#1526
Performance Improvement : Creating Spans and LogRecords are now faster, by avoiding expensive cloning of
Resourcefor every Span/LogRecord.Changed
Breaking
#1313
#1350
Changes how Span links/events are stored to achieve performance gains. See
below for details:
Behavior Change: When enforcing
max_links_per_span,max_events_per_spanfrom
SpanLimits, links/events are kept in the first-come order. The previous"eviction" based approach is no longer performed.
Breaking Change Affecting Exporter authors:
SpanDatanow storeslinksasSpanLinksinstead ofEvictedQueuewhereSpanLinksis a struct with aVecof links anddropped_count.SpanDatanow storeseventsasSpanEventsinstead ofEvictedQueuewhereSpanEventsis a struct with aVecof events anddropped_count.Breaking Remove
TextMapCompositePropagator#1373. UseTextMapCompositePropagatorin opentelemetry API.#1375 Fix metric collections during PeriodicReader shutdown
Breaking #1480 Remove fine grained
BatchConfigconfigurations fromBatchLogProcessorBuilderandBatchSpanProcessorBuilder. UseBatchConfigBuilderto construct aBatchConfiginstance and pass it usingBatchLogProcessorBuilder::with_batch_configorBatchSpanProcessorBuilder::with_batch_config.Breaking #1480 Remove mutating functions from
BatchConfig, useBatchConfigBuilderto construct aBatchConfiginstance.Breaking #1495 Remove Batch LogRecord&Span Processor configuration via non-standard environment variables. Use the following table to migrate from the no longer supported non-standard environment variables to the standard ones.
Breaking 1455 Make the LoggerProvider Owned
Loggernow takes an Owned Logger instead of aWeak<LoggerProviderInner>LoggerProviderInneris no longerpub (crate)Logger.provider()now returns&LoggerProviderinstead of anOption<LoggerProvider>1519 Performance improvements
when calling
Counter::add()andUpDownCounter::add()with an empty set of attributes(e.g.
counter.Add(5, &[]))Fixed
v0.21.0Compare 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
opentelemetrycrate now only carries the API types #1186. Use theopentelemetry_sdkcrate for the SDK types.trace::noop::NoopSpanno longer implementsDefaultand instead exposes aconst DEFAULTvalue. #1270SpanBuilderattributes changed fromOrderMap<Key, Value>toVec<KeyValue>andwith_attributes_mapmethod is removed fromSpanBuilder. This implies that OpenTelemetry API will no longer perform de-dup of attribute Keys. #1293. Please share feedback here, if you are affected.open-telemetry/opentelemetry-rust (opentelemetry_sdk)
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.
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
opentelelemetry_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
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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.