v1.40.0
📦 opentelemetryView on GitHub →
✨ 7 features🐛 7 fixes⚡ 1 deprecations🔧 8 symbols
Summary
This release introduces experimental features like composable samplers and TracerConfigurator, improves exporter resilience, and deprecates the old logging handler in favor of a dedicated instrumentation package.
Migration Steps
- If you were using `LoggingHandler` in `opentelemetry-sdk`, migrate to using `opentelemetry-instrumentation-logging`.
✨ New Features
- Added support for loading all resource detectors by setting the environment variable `OTEL_EXPERIMENTAL_RESOURCE_DETECTORS` to `*`.
- Added experimental composable rule-based sampler.
- Implemented span start/end metrics.
- Added environment variable carriers to the API.
- Implemented experimental `TracerConfigurator`.
- The SDK configurator in `opentelemetry-sdk` now allows overriding the default processors.
- Configuration models in `opentelemetry-sdk` can now be automatically generated using the OTel config JSON schema.
🐛 Bug Fixes
- Fixed re-initialization of the gRPC channel on UNAVAILABLE errors in `opentelemetry-exporter-otlp-proto-grpc`.
- Fixed duplicate HELP/TYPE declarations for Prometheus metrics that had different label sets.
- Fixed the type hint of the `_metrics_data` property in `opentelemetry-sdk` to correctly allow `None`.
- Prevented possible endless recursion in `SimpleLogRecordProcessor.on_emit`.
- Fixed retry logic and error handling for connection failures in trace, metric, and log exporters in `opentelemetry-exporter-otlp-proto-http`.
- Avoided `RuntimeError` during iteration of the view instrument match dictionary in `MetricReaderStorage.collect()` in `opentelemetry-sdk`.
- Fixed an instrument creation race condition in `opentelemetry-sdk`.
Affected Symbols
⚡ Deprecations
- The `LoggingHandler` in `opentelemetry-sdk` is deprecated in favor of using `opentelemetry-instrumentation-logging`. See the documentation for `opentelemetry-instrumentation-logging` for migration details.