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.27
->0.29
0.27
->0.29
0.27
->0.29
0.27
->0.29
0.27
->0.29
0.27
->0.29
0.28
->0.30
0.24
->0.28
Release Notes
open-telemetry/opentelemetry-rust (opentelemetry)
v0.29.1
Compare Source
Release 2025-Apr-01
WithContext
atopentelemetry::trace::context::WithContext
#2879 to restore backwards compatabilityWithContext
andFutureExt
are inopentelemetry::context
as they are independent of the trace signal. Users should prefer this path.v0.29.0
Compare Source
Released 2025-Mar-21
ExportError
trait fromopentelemetry::trace::ExportError
toopentelemetry_sdk::export::ExportError
TraceError
enum fromopentelemetry::trace::TraceError
toopentelemetry_sdk::trace::TraceError
TraceResult
type alias fromopentelemetry::trace::TraceResult
toopentelemetry_sdk::trace::TraceResult
InstrumentationScope
implementation forPartialEq
andHash
fixed to include Attributes also.Baggage
fromValue
toStringValue
Baggage
constants 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 referenceBaggage
can't be retrieved from theContext
directly anymore and needs to be accessed viacontext.baggage()
with_baggage()
andcurrent_with_baggage()
override any existingBaggage
in theContext
Baggage
keys can't be empty and only allow ASCII visual chars, except"(),/:;<=>?@​[\]{}
(see RFC7230, Section 3.2.6)KeyValueMetadata
does not publicly expose its fields. This should be transparent change to the users.Context
to use a stack to properly handle out of order dropping ofContextGuard
. This imposes a limit of65535
nested contexts on a single thread. See #2378 and #1887.name: Option<&str>
parameter to theevent_enabled
methodon 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
opentelemetry::global::shutdown_tracer_provider()
Removed from this crate, should now usetracer_provider.shutdown()
see #2369 for a migration example.opentelemetry::PropagationError
struct.open-telemetry/opentelemetry-rust (opentelemetry-http)
v0.29.0
Compare Source
Released 2025-Mar-21
opentelemetry
dependency version to 0.29.v0.28.0
Compare Source
Released 2025-Feb-10
opentelemetry
dependency version to 0.28.tracing
crate.HttpClient::send_bytes
withbytes::Bytes
request payload and deprecate oldHttpClient::send
function.open-telemetry/opentelemetry-rust (opentelemetry-otlp)
v0.29.0
Compare Source
Released 2025-Mar-21
Update
opentelemetry
dependency version to 0.29Update
opentelemetry_sdk
dependency version to 0.29Update
opentelemetry-http
dependency version to 0.29Update
opentelemetry-proto
dependency version to 0.29The
OTEL_EXPORTER_OTLP_TIMEOUT
,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT
,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT
andOTEL_EXPORTER_OTLP_LOGS_TIMEOUT
are changed from seconds to miliseconds.Fixed
.with_headers()
inHttpExporterBuilder
to correctly support multiple key/value pairs. #2699Fixed
#2770
partially to properly handle
shutdown()
when usinghttp
. (tonic
stilldoes not do proper shutdown)
Breaking
ExporterBuilder's build() method now Result with
ExporterBuildError
being theError variant. Previously it returned signal specific errors like
LogError
from the
opentelemetry_sdk
, which are no longer part of the sdk. No changesrequired if you were using unwrap/expect. If you were matching on the returning
Error enum, replace with the enum
ExporterBuildError
. Unlike the previousError
which contained many variants unrelated to building an exporter, thenew one returns specific variants applicable to building an exporter. Some
variants might be applicable only on select features.
Also, now unused
Error
enum is removed.Breaking
ExportConfig
'stimeout
field is now optional(Option<Duration>
)Breaking Export configuration done via code is final. ENV variables cannot be used to override the code config.
Do not use code based config, if there is desire to control the settings via ENV variables.
List of ENV variables and corresponding setting being affected by this change.
OTEL_EXPORTER_OTLP_ENDPOINT
->ExportConfig.endpoint
OTEL_EXPORTER_OTLP_TIMEOUT
->ExportConfig.timeout
v0.28.0
Compare Source
Released 2025-Feb-10
opentelemetry
dependency version to 0.28.opentelemetry_sdk
dependency version to 0.28.opentelemetry-http
dependency version to 0.28.opentelemetry-proto
dependency version to 0.28.LogRecord's
event_name()
is now automatically populated on the newly added"event_name" field in LogRecord proto definition.
"reqwest-blocking-client" features as default, to align with the
specification.
2516
opentelemetry_otlp::metrics::MetricsClient
and
MetricExporter::new(..)
method. UseMetricExporter::builder()...build()
to obtainMetricExporter
.export timeout interval configured in below order
OTEL_EXPORTER_OTLP_TRACES_TIMEOUT
,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT
orOTEL_EXPORTER_OTLP_TIMEOUT
.OTEL_EXPORTER_OTLP_TIMEOUT
env variable.with_http().with_timeout()
API method ofLogExporterBuilder
andSpanExporterBuilder
andMetricsExporterBuilder
.open-telemetry/opentelemetry-rust (opentelemetry-semantic-conventions)
v0.29.0
Compare Source
Released 2025-Mar-21
v0.28.0
Compare Source
Released 2025-Feb-10
open-telemetry/opentelemetry-rust (opentelemetry-zipkin)
v0.29.0
Compare Source
Released 2025-Mar-21
Update
opentelemetry
dependency version to 0.29.Update
opentelemetry_sdk
dependency version to 0.29.Update
opentelemetry-http
dependency version to 0.29.Breaking The
ZipkinExporterBuilder::build()
method now returns aResult<ZipkinExporter, ExporterBuildError>
. TheExporterBuildError
enumlists possible failures specific to the Zipkin exporter and was renamed from
opentelemetry_zipkin::Error
. Previously, this method returned aTraceError
from the
opentelemetry_sdk
crate, which was unrelated to Zipkin builderfailures.
2839
v0.28.0
Compare Source
Released 2025-Feb-10
Update
opentelemetry
dependency version to 0.28.Update
opentelemetry_sdk
dependency version to 0.28.Update
opentelemetry-http
dependency version to 0.28.Bump msrv to 1.75.0.
Breaking The
opentelemetry_zipkin::new_pipeline()
interface is now replaced withopentelemetry_zipkin::ZipkinExporter::builder()
.Additionally, the service name needs to be set on the tracer provider.
Previous Signature:
Updated Signature:
open-telemetry/opentelemetry-rust (opentelemetry_sdk)
v0.29.0
Compare Source
Released 2025-Mar-21
opentelemetry
dependency to 0.29.opentelemetry-http
dependency to 0.29.Runtime
trait has been simplified and refined. See the #2641for the changes.
async-std
support forRuntime
, asasync-std
crate is deprecated.MeterProviderBuilder::with_resource
,TracerProviderBuilder::with_resource
,LoggerProviderBuilder::with_resource
are now additive (#2677).ExportError
trait fromopentelemetry::trace::ExportError
toopentelemetry_sdk::export::ExportError
TraceError
enum fromopentelemetry::trace::TraceError
toopentelemetry_sdk::trace::TraceError
TraceResult
type alias fromopentelemetry::trace::TraceResult
toopentelemetry_sdk::trace::TraceResult
force_flush()
inPushMetricExporter
synchronousSpanExporter
trait 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_timeout
method is added to MetricExporter trait. This is breaking change for customMetricExporter
authors.Bug Fix:
BatchLogProcessor
now correctly callsshutdown
on the exporterwhen its
shutdown
is invoked.Reduced some info level logs to debug
Breaking for custom LogProcessor/Exporter authors: Changed
name
parameter from
&str
toOption<&str>
inevent_enabled
method on theLogProcessor
andLogExporter
traits.SdkLogger
no longer passes itsscope
name but instead passes the incomingname
when invokingevent_enabled
on processors.Breaking for custom LogExporter authors:
shutdown()
method inLogExporter
trait 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::OTelSdkError
andopentelemetry_sdk::error::OTelSdkResult
.2790
Breaking for custom
LogProcessor
authors: Changedset_resource
to 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.0
Compare 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
opentelemetry
dependency to 0.28.Update
opentelemetry-http
dependency 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
EnvResourceDetector
to 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
ResourceBuilder
for an easy way to create newResource
sBreaking: 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_time
andtime
is moved from DataPoints to aggregations (Sum, Gauge, Histogram,ExpoHistogram) see
#2377 and
#2411, to
reduce memory.
Breaking
start_time
is no longer optional forSum
aggregation, see#2367, but
is still optional for
Gauge
aggregation see#2389.
SimpleLogProcessor modified to be generic over
LogExporter
to avoiddynamic dispatch to invoke exporter. If you were using
with_simple_exporter
to addLogExporter
with 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::Builder
toopentelemetry_sdk::logs::LoggerProviderBuilder
.Rename
opentelemetry_sdk::trace::Builder
toopentelemetry_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-tonic
orreqwest-blocking-client
are the onlysupported features (
hyper
,reqwest
are not supported) These are nowenabled by default and can be migrated to by removing the extra
rt:Runtime
argument 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
,reqwest
HTTP Clientswith_max_concurrent_exports
is 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_runtime
experimental_logs_batch_log_processor_with_async_runtime
experimental_trace_batch_span_processor_with_async_runtime
periodic_reader_with_async_runtime::PeriodicReader
,log_processor_with_async_runtime::BatchLogProcessor
andspan_processor_with_async_runtime::BatchSpanProcessor
rt-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_timeout
methods onBatchConfigBuilder
,PeriodicReaderBuilder
OTEL_BLRP_EXPORT_TIMEOUT
,OTEL_BSP_EXPORT_TIMEOUT
Users 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_TIMEOUT
OTEL_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_runtime
feature forruntime-specific traits.
rt-tokio
,rt-tokio-current-thread
, andrt-async-std
) now depend on theexperimental_async_runtime
feature.rt-tokio
,rt-tokio-current-thread
, orrt-async-std
will automaticallyenable the
experimental_async_runtime
feature.experimental_async_runtime
feature in your Cargo.toml and implement the required
Runtime` 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::Error
enum.Breaking (Affects custom Exporter authors only) Moved
ExportError
traitfrom
opentelemetry::export::ExportError
toopentelemetry_sdk::ExportError
Breaking (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
,Logger
andLogRecord
toSdkLoggerProvider
,SdkLogger
andSdkLogRecord
respectively to avoid namecollision with public API types.
#2612
Breaking Renamed
TracerProvider
andTracer
toSdkTracerProvider
andSdkTracer
to avoid name collision with public API types.Tracer
is stilltype-aliased to
SdkTracer
to 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
OTelSdkResult
as their return type. Following PRsshow the exact changes:
2613
2625
2604
2606
2573
tokio-rs/tracing-opentelemetry (tracing-opentelemetry)
v0.30.0
Compare Source
Breaking Changes
changelog
for more information.
v0.29.0
Compare Source
What's Changed
OpenTelemetryLayer
into a global subscriber by @mzabaluev in https://github.com/tokio-rs/tracing-opentelemetry/pull/175davidB/tracing-opentelemetry-instrumentation-sdk (tracing-opentelemetry-instrumentation-sdk)
v0.28.0
Compare Source
Changed
v0.26.0
Compare Source
Changed
Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), 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.