v1.44.0
Breaking Changes📦 opentelemetry-pythonView on GitHub →
⚠ 2 breaking✨ 17 features🐛 5 fixes🔧 22 symbols
Summary
This release introduces several new features for declarative configuration, including support for instrumentors and file exporters, along with improvements to log record processing and resource attribute handling. It also removes the deprecated Events API and SDK.
⚠️ 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
- 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.
- When using `EnvironmentGetter.get` in `opentelemetry-api`, explicitly pass the mapping from which to get environment variables as the first argument.
- Users who depend on `process.command_args` and `process.command_line` resource attributes from `ProcessResourceDetector` in `opentelemetry-sdk` 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`.
- Updated the declarative configuration package README in `opentelemetry-sdk` to point to the shared language support status matrix.
- Documented that Python-implementation extensions (`OTEL_PYTHON_*` variables) are bypassed when `OTEL_CONFIG_FILE` is set in `opentelemetry-sdk`.
- 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.
- Updated the logs example to use `opentelemetry-instrumentation-logging`.
- Moved declarative configuration from `opentelemetry.sdk._configuration` to the new public `opentelemetry-configuration` package (`opentelemetry.configuration` namespace).
- Prevented in-place mutation of `Context` via inherited `dict` methods in `opentelemetry-api`.
🐛 Bug Fixes
- Reverted `BoundedAttributes` RLock back to Lock in `opentelemetry-sdk`.
- Dropped non-finite measurements (NaN and Inf) at the instrument level to prevent permanent aggregation poisoning in `opentelemetry-sdk`.
- Raised `ValueError` when `ExplicitBucketHistogramAggregation` boundaries are not strictly increasing or finite in `opentelemetry-sdk`.
- `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`.
Affected Symbols
opentelemetry-docker-testsopentelemetry-exporter-otlp-commonopentelemetry-sdkLogRecordExporterInMemorySpanExporterExponentialBucketHistogramAggregationExplicitBucketHistogramAggregationSynchronousMultiLogRecordProcessorConcurrentMultiLogRecordProcessorTracerProvideropentelemetry-instrumentation-loggingopentelemetry-configurationopentelemetry.sdk._configurationopentelemetry.configurationopentelemetry-apiEnvironmentGetteropentelemetry-semantic-conventionsopentelemetry-exporter-otlp-proto-httpBatchLogRecordProcessorReadableLogRecordContextProcessResourceDetector