v1.43.0
📦 opentelemetryView on GitHub →
✨ 12 features🐛 4 fixes⚡ 1 deprecations🔧 19 symbols
Summary
This release introduces significant enhancements to declarative configuration, including recursive dataclass conversion, support for pull metric readers, and the introduction of the `configure_sdk` entry point. It also adds new exporters and improves robustness in error logging and attribute handling.
Migration Steps
- If using declarative configuration, note that terminology for component loading has changed from "known/unknown" to "built-in/user-defined".
- Replace usages of `typing.Union` and `typing.Optional` with the `|` operator if targeting Python versions that support it (post 3.9 removal).
✨ New Features
- `opentelemetry-sdk`: Added `add_metric_reader` and `remove_metric_reader` public APIs to register/unregister metric readers at runtime.
- `opentelemetry-exporter-prometheus`: Added support for configuring metric scope labels.
- `opentelemetry-exporter-http-transport`: Added new package for HTTP exporters.
- `opentelemetry-sdk`: Added support for composite/development samplers in declarative file configuration.
- `opentelemetry-exporter-otlp-json-file`: Added OTLP JSON File exporter implementation.
- `opentelemetry-sdk`: Added `ServiceInstanceIdResourceDetector` for populating `service.instance.id`.
- `opentelemetry-sdk`: Declarative config loader now recursively converts parsed dicts into typed dataclass instances, enabling end-to-end YAML/JSON configuration via factory functions.
- `opentelemetry-sdk`: Added `configure_sdk(config)` as a single entry point for declarative configuration initialization.
- `opentelemetry-sdk`: The declarative config loader now honors the `OTEL_CONFIG_FILE` environment variable to load configuration files.
- `opentelemetry-exporter-otlp-proto-common` and `opentelemetry-exporter-otlp-json-common`: Encoders now always accept null and encode it as an empty `AnyValue`.
- `opentelemetry-sdk`: Added validation for the declarative config `file_format` version.
- `opentelemetry-exporter-http-transport`: Enabled entry-point loading of transport implementations.
🐛 Bug Fixes
- `opentelemetry-exporter-otlp-proto-grpc`: gRPC error details are now added to the log message when a gRPC call fails.
- Preserved the random trace ID flag when creating child spans instead of unconditionally setting the random trace id bit.
- `opentelemetry-api`: Fixed SelectableGroups deprecation warning.
- `opentelemetry-sdk`: Made `SynchronousMeasurementConsumer.consume_measurement` lock free to prevent deadlocks.
Affected Symbols
opentelemetry-sdkopentelemetry-exporter-prometheusopentelemetry-exporter-otlp-proto-grpcopentelemetry-exporter-http-transportopentelemetry-exporter-otlp-json-fileopentelemetry-proto-jsonopentelemetry-protoServiceInstanceIdResourceDetectorconfigure_sdkOpenTelemetryConfigurationOTEL_CONFIG_FILEopentelemetry-exporter-otlp-proto-commonopentelemetry-exporter-otlp-json-commonSynchronousMeasurementConsumeropentelemetry-apiopentelemetry_contextContextVarsRuntimeContextEnvironmentGetterEnvironmentSetter
⚡ Deprecations
- Typing aliases deprecated in python 3.9 have been removed; usages of typing.Union and typing.Optional should now use the | operator for union types.