Change8

v1.44.0

Breaking Changes
📦 opentelemetryView on GitHub →
2 breaking13 features🐛 7 fixes🔧 20 symbols

Summary

This release introduces several new features for declarative configuration, logging, and resource attribute management. It also includes bug fixes and refactors for improved stability and performance.

⚠️ Breaking Changes

  • The `opentelemetry-sdk`'s `BatchLogRecordProcessor` now clears the `Context` object before buffering. Custom log exporters that access `context` from `ReadableLogRecord` might be affected as the context will now be an empty `Context()` instead of the original.
  • The `opentelemetry-api` has removed environment carrier environment snapshot caching. You must now explicitly pass the mapping from which to get environment variables as the first argument to `EnvironmentGetter.get`.

Migration Steps

  1. If you are using custom log exporters that access `context` from `ReadableLogRecord`, you may need to adjust your code to handle an empty `Context()` object.
  2. When using `EnvironmentGetter.get` in `opentelemetry-api`, explicitly pass the mapping from which to retrieve environment variables as the first argument.
  3. Users who depend on `process.command_args` and `process.command_line` resource attributes from `opentelemetry-sdk`'s `ProcessResourceDetector` must now pass `include_command_args=True`.

✨ New Features

  • Refactored Docker tests in `opentelemetry-docker-tests` to properly validate contents of exported telemetry.
  • Added a shared package `opentelemetry-exporter-otlp-common` for common OTLP utilities.
  • Introduced `MissingDependencyError` exception in `opentelemetry-sdk` for declarative configuration and used it for missing optional dependency errors.
  • Added the ability to refresh process-dependent Resource attributes in `opentelemetry-sdk`.
  • Added `force_flush` method to `LogRecordExporter` ABC in `opentelemetry-sdk`.
  • Made it possible to limit the size of stored spans in `InMemorySpanExporter` in `opentelemetry-sdk`.
  • Added log record limits environment variables `OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT` and `OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT` in `opentelemetry-sdk`.
  • Added support for file exporter with declarative config in `opentelemetry-sdk`.
  • Exposed `SynchronousMultiLogRecordProcessor` and `ConcurrentMultiLogRecordProcessor` publicly in `opentelemetry-sdk`.
  • Pointed the declarative configuration package README in `opentelemetry-sdk` at the shared language support status matrix in the `opentelemetry-configuration` repo.
  • Wired `id_generator` from declarative configuration to `TracerProvider` in `opentelemetry-sdk`.
  • Added support for activating instrumentors from a declarative configuration file via the `instrumentation/development.python` section in `opentelemetry-sdk`. Instrumentors can declare a `configuration` attribute for option validation.
  • Added `record_min_max` option to `ExponentialBucketHistogramAggregation` in `opentelemetry-sdk`, matching `ExplicitBucketHistogramAggregation` and the specification.

🐛 Bug Fixes

  • Reverted `BoundedAttributes` RLock back to Lock in `opentelemetry-sdk`.
  • Updated logs example to use `opentelemetry-instrumentation-logging`.
  • Dropped non-finite measurements (NaN and Inf) at the instrument level in `opentelemetry-sdk` to prevent permanent aggregation poisoning.
  • Raised `ValueError` when `ExplicitBucketHistogramAggregation` boundaries are not strictly increasing or finite in `opentelemetry-sdk`.
  • The `ProcessResourceDetector` in `opentelemetry-sdk` no longer collects or emits `process.command_args` and `process.command_line` by default. Users needing these attributes must pass `include_command_args=True`.
  • Fixed the OTLP HTTP metric exporter self-observability metrics over-counting data points when `max_export_batch_size` splits a batch in `opentelemetry-exporter-otlp-proto-http`.
  • Prevented in-place mutation of `Context` via inherited `dict` methods in `opentelemetry-api`.

Affected Symbols