unstale

pypi / opentelemetry-sdk

opentelemetry-sdk

What changed in opentelemetry-sdk 1, from its official release notes, upgrade guides and advisories. Also covers opentelemetry-exporter-otlp-proto-grpc, opentelemetry-exporter-otlp-proto-http. Sources checked 2026-10-18.

18 breaking1 security4 deprecations57 new APIs and options9 behavior and defaults2 tooling33 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

opentelemetry-sdk 1124 changes

Breaking changes 18

  • Views using ExponentialBucketHistogramAggregation for asynchronous instruments are now rejected instead of silently producing no data.

    1.45.0release notes

  • Tracer, meter, and logger configurator scope-name matching is now case-sensitive on every platform.

    1.45.0release notes

  • Values Python considers equal but the data model does not, such as True, 1, and 1.0, are kept in separate metric streams.

    1.45.0release notes

  • Spans ended after shutdown are dropped rather than sent to the exporter, and counted with error.type=already_shutdown.

    1.45.0release notes

  • Removes the deprecated Events API/SDK; use LogRecord with the event_name field instead.

    1.44.0release notes

  • Raises ValueError when boundaries are not strictly increasing or finite.

    1.44.0release notes

  • Declarative configuration moves from opentelemetry.sdk._configuration into the experimentally published opentelemetry-configuration package under the opentelemetry.configuration namespace; the file-configuration extra remains an installation alias.

    1.44.0release notes

  • No longer collects or emits process.command_args and process.command_line by default because the values may contain sensitive information; pass include_command_args=True to include them.

    1.44.0release notes

  • BatchLogRecordProcessor clears Context before buffering, so exported records contain an empty Context instead of the original; custom exporters that access context may be affected.

    1.44.0release notes

  • Declarative configuration rejects unsupported major versions and warns when a newer minor version is used.

    1.43.0release notes

  • The metric name changes with the semantic conventions update.

    1.42.0release notes

  • The metric name changes with the semantic conventions update.

    1.42.0release notes

  • Resource detector entry points are loaded only when configured via this environment variable.

    1.42.0release notes

  • Python 3.9 support is dropped; Python 3.10 or later is now required.

    1.42.0release notes

  • Unused Jaeger exporter environment variables are dropped; the exporter was removed in 1.22.0.

    1.40.0release notes

  • Removed LogData; log exporters and processors should use ReadableLogRecord and ReadWriteLogRecord instead.

    1.39.0release notes

  • Use ReadableLogRecord for log exporter batches and when exporting processed log records.

    1.39.0release notes

  • Use ReadWriteLogRecord for log processing; use ReadableLogRecord for exporting.

    1.39.0release notes

Security 1

  • Newlines in substituted values are emitted as quoted YAML scalars, preventing YAML structure injection and meeting the spec requirement.

    1.42.0release notes

Deprecations 4

  • Logger minimum_severity and trace_based configuration fields are unsupported by the Python SDK and are ignored with a warning.

    1.45.0release notes

  • LoggingHandler is deprecated in favor of opentelemetry-instrumentation-logging.

    1.40.0release notes

  • The Events API/SDK is deprecated; use the Logs API/SDK instead, representing an event as a LogRecord with event_name set.

    1.39.0release notes

  • Warnings were added for classes that will be deprecated and renamed in 1.39.0.

    1.38.0release notes

New APIs and options 57

  • Adds the stable AlwaysRecordSampler.

    1.45.0release notes

  • Logger API, SDK, and LogRecordProcessor gain enabled() so instrumentation can skip expensive work when logging is disabled; Logger subclasses must implement it.

    1.45.0release notes

  • The host resource detector now adds host.id.

    1.45.0release notes

  • Declarative configuration's top-level log_level maps OTel SeverityNumber to a Python logging level and applies it to the opentelemetry logger.

    1.45.0release notes

  • LoggerProvider now supports log_record_limits.

    1.45.0release notes

  • OTLP HTTP exporters accept max_request_size; serialized requests exceeding the default 64 MiB limit are dropped before sending, measured before compression. Set to 0 to disable.

    1.45.0release notes

  • Exposes ConcurrentMultiLogRecordProcessor publicly.

    1.44.0release notes

  • Adds the record_min_max option, matching ExplicitBucketHistogramAggregation and the specification.

    1.44.0release notes

  • Adds support for configuring the file exporter with declarative configuration.

    1.44.0release notes

  • Can now limit the size of spans stored by the in-memory exporter.

    1.44.0release notes

  • Declarative configuration can activate instrumentors through this section; instrumentors can declare configuration options validated by the SDK component type-coercion pipeline.

    1.44.0release notes

  • Adds a force_flush method to the LogRecordExporter abstract base class.

    1.44.0release notes

  • Adds MissingDependencyError for declarative configuration and missing optional dependency errors.

    1.44.0release notes

  • Adds an environment variable to configure the log record attribute count limit.

    1.44.0release notes

  • Adds an environment variable to configure the log record attribute value length limit.

    1.44.0release notes

  • Adds the ability to refresh process-dependent Resource attributes.

    1.44.0release notes

  • Exposes SynchronousMultiLogRecordProcessor publicly.

    1.44.0release notes

  • Register metric readers at runtime.

    1.43.0release notes

  • Declarative file configuration now supports composite/development samplers.

    1.43.0release notes

  • Adds a single declarative configuration entry point that builds the resource and applies tracer, meter, and logger providers and the propagator globally; it honors the top-level disabled flag.

    1.43.0release notes

  • Introduces experimental entry points for OpAMP agent integration.

    1.43.0release notes

  • When set, the SDK loads and applies the referenced YAML or JSON declarative configuration file instead of using the env-var-based initialization path.

    1.43.0release notes

  • Declarative file configuration now supports pull metric readers, including a Prometheus metric reader configured via prometheus_development.

    1.43.0release notes

  • Unregister metric readers at runtime.

    1.43.0release notes

  • Adds a resource detector for populating service.instance.id.

    1.43.0release notes

  • Declarative file configuration can configure a LoggerProvider without reading environment variables.

    1.42.0release notes

  • Declarative file configuration can instantiate a LoggerProvider without reading environment variables.

    1.42.0release notes

  • Declarative file configuration supports the service resource detector.

    1.42.0release notes

  • IdGenerator implementations that randomly generate the 56 least significant bits should implement this method, which returns True.

    1.42.0release notes

  • Declarative file configuration gains a shared utility for loading plugins via entry points; propagator loading uses it.

    1.42.0release notes

  • Logger emit and LogRecord attributes gain exception support.

    1.42.0release notes

  • Declarative file configuration can load exporter plugins for traces, metrics, and logs through the corresponding entry point groups.

    1.42.0release notes

  • Declarative file configuration can load propagator plugins through this entry point group.

    1.42.0release notes

  • Declarative file configuration can load resource detector plugins through this entry point group.

    1.42.0release notes

  • Declarative file configuration can load sampler plugins through this entry point group.

    1.42.0release notes

  • Selectively enables exporting SDK internal metrics.

    1.42.0release notes

  • Accepts a custom Prometheus registry through the new keyword argument.

    1.42.0release notes

  • Adds declarative file configuration support for creating a MeterProvider without reading environment variables.

    1.41.0release notes

  • Adds declarative file configuration support for creating a Resource and creating or configuring a propagator without reading environment variables.

    1.41.0release notes

  • Adds declarative file configuration support for creating a TracerProvider without reading environment variables.

    1.41.0release notes

  • Adds support for the container resource detector in declarative file configuration, loading it through the contrib package entry point.

    1.41.0release notes

  • Adds support for the host resource detector in declarative file configuration.

    1.41.0release notes

  • Adds support for the process resource detector in declarative file configuration.

    1.41.0release notes

  • Adds YAML/JSON loading, environment variable substitution, and schema validation for SDK file configuration.

    1.41.0release notes

  • Implements the log creation metric.

    1.41.0release notes

  • Implements an experimental Logger configurator.

    1.41.0release notes

  • Implements an experimental Meter configurator.

    1.41.0release notes

  • Implements metric reader metrics.

    1.41.0release notes

  • Implements processor metrics.

    1.41.0release notes

  • An experimental composable rule based sampler is added.

    1.40.0release notes

  • Environment variable carriers are added to the API.

    1.40.0release notes

  • The SDK configurator now makes it possible to override the default processors.

    1.40.0release notes

  • Span start/end metrics are implemented.

    1.40.0release notes

  • An experimental TracerConfigurator is implemented.

    1.40.0release notes

  • SDK log records now include instrumentation scope.

    1.39.0release notes

  • Added as an optional dependency of the OTLP gRPC and HTTP exporters.

    1.39.0release notes

  • Logger.emit now accepts separated keyword arguments.

    1.38.0release notes

Behavior and default changes 9

  • Declarative configuration now wires top-level attribute_limits into per-signal providers.

    1.45.0release notes

  • Attribute values now include None, heterogeneous and nested sequences, and mappings; bytes are passed through instead of decoded to strings.

    1.45.0release notes

  • Logging force_flush timeout defaults are unified to 30000ms.

    1.45.0release notes

  • Declarative configuration now wires id_generator to TracerProvider.

    1.44.0release notes

  • Recursively converts parsed dictionaries into typed dataclass instances, including nested dataclasses, lists of dataclasses, and enum values, enabling end-to-end YAML/JSON configuration through factory functions.

    1.43.0release notes

  • Changes the default schedule delay from 5000ms to 1000ms to comply with the OTel specification; logs may be exported five times more frequently by default.

    1.41.0release notes

  • Adds deepcopy support for BoundedAttributes and BoundedList.

    1.41.0release notes

  • Updates the vendored configuration schema from v1.0.0-rc.3 to v1.0.0, affecting schema validation of file configuration.

    1.41.0release notes

  • Warnings from the events API are silenced for internal users.

    1.39.1release notes

Tooling 2

  • Generated config models support additional properties so plugin and custom component names can flow through typed dataclasses.

    1.42.0release notes

  • Configuration models are automatically generated using the OTel config JSON schema.

    1.40.0release notes

Fixes and other changes 33

  • Fixed a thread leak in resource initialization when using long-running resource detectors.

    1.45.1release notes

  • Fixes a TypeError in os.fork() when a BatchProcessor or PeriodicExportingMetricReader is garbage collected.

    1.45.0release notes

  • Methods on FixedSizeExemplarReservoirABC are now thread safe.

    1.45.0release notes

  • Waiting in get_aggregated_resources() is now bounded by the timeout.

    1.45.0release notes

  • Declarative configurator development fields are now applied when creating providers, so per-instrumentation-scope enabled overrides take effect instead of being discarded.

    1.45.0release notes

  • Declarative configurator development fields are now applied when creating providers, so per-instrumentation-scope enabled overrides take effect instead of being discarded.

    1.45.0release notes

  • Dropped records after shutdown are counted with error.type=already_shutdown for batch span/log and simple log processors.

    1.45.0release notes

  • Processor metrics are counted when records are submitted to the exporter, rather than after export completes; exporter failures are no longer stamped as error.type.

    1.45.0release notes

  • Fixes a TypeError in os.fork() when a BatchProcessor or PeriodicExportingMetricReader is garbage collected.

    1.45.0release notes

  • Resource remains hashable and serialisable when an attribute value is bytes, avoiding TypeError from OTLP encoders.

    1.45.0release notes

  • User-provided service.instance.id values populated through resource detectors are no longer overridden.

    1.45.0release notes

  • Every bucket is filled before random sampling.

    1.45.0release notes

  • Values from synchronous instruments using last-value aggregation are retained across cumulative collections.

    1.45.0release notes

  • Declarative configurator development fields are now applied when creating providers, so per-instrumentation-scope enabled overrides take effect instead of being discarded.

    1.45.0release notes

  • Out-of-range numeric OTEL_TRACES_SAMPLER_ARG values now log a warning and fall back instead of raising ValueError.

    1.45.0release notes

  • Instrument-name matching now applies views configured with the instrument's real mixed-case name; matching is case-insensitive and platform-independent.

    1.45.0release notes

  • Drops NaN and Inf measurements at the instrument level to prevent permanent aggregation poisoning.

    1.44.0release notes

  • The method is now lock free to avoid deadlocks.

    1.43.0release notes

  • Child span creation now preserves the random trace ID flag instead of always setting it based on the available trace ID generator.

    1.42.1release notesrelease notes

  • Declarative OTLP HTTP exporters now accept deflate compression instead of rejecting it as unsupported.

    1.42.0release notes

  • A multi-processor force flush no longer skips remaining processors when one returns None.

    1.42.0release notes

  • Attributes passed to instrument add or record are copied, so later mutations do not affect recorded data points.

    1.42.0release notes

  • Uses sys.orig_argv so process attributes reflect the original invocation for python -m <module> runs.

    1.42.0release notes

  • Resource detector ordering is now deterministic.

    1.42.0release notes

  • Maps Python CRITICAL log level to OTel FATAL severity text to comply with the specification.

    1.41.0release notes

  • Fixes an AttributeError when this aggregation is applied to non-Histogram instruments without explicit boundaries.

    1.41.0release notes

  • Fixes type annotations on MetricReader and related types.

    1.41.0release notes

  • ConcurrentMultiSpanProcessor is made fork safe.

    1.40.0release notes

  • Fixes an instrument creation race condition.

    1.40.0release notes

  • Avoids a RuntimeError while iterating the view instrument match dictionary during collection.

    1.40.0release notes

  • Python 3.14 is supported.

    1.40.0release notes

  • Prevents possible endless recursion in on_emit.

    1.40.0release notes

  • Attribute values that are not AnyValue are converted to strings so they can be exported.

    1.39.0release notes