Migrating to OpenTelemetry v1.42.0
Version v1.42.0 introduces 2 breaking changes. This guide details how to update your code.
Released: 5/19/2026
2
Breaking Changes
3
Migration Steps
16
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
IdGeneratorLoggerLogRecordopentelemetry-exporter-otlp-proto-grpccreate_logger_providerconfigure_logger_providerdetection_development.detectorsPrometheusMetricReaderopentelemetry_sampleropentelemetry_propagatoropentelemetry_*_exporteropentelemetry_resource_detectorEnvironmentGetterEnvironmentSetterProcessResourceDetectorW3CBaggagePropagatorBreaking Changes
●Issue #1
Python 3.9 support has been dropped. Users must upgrade to Python 3.10 or newer.
●Issue #2
The third-party importlib-metadata dependency was removed from `opentelemetry-api` because Python >= 3.10 is now required, which includes this functionality in the standard library.
Migration Steps
- 1If implementing custom `IdGenerator` for W3C traceparent headers, consider implementing the `is_trace_id_random` method if your generator produces random trace IDs.
- 2If using declarative configuration, note that resource detector loading is now conditional on `OTEL_EXPERIMENTAL_RESOURCE_DETECTORS` being set if you rely on entry point loading.
- 3If relying on W3C Baggage size limits, be aware that injection now enforces limits (180 pairs max, 4096 bytes per pair, 8192 bytes total header size).
Release Summary
This release introduces extensive support for declarative configuration loading via entry points for various components (samplers, exporters, detectors) and enhances W3C traceparent and Baggage handling. It also drops support for Python 3.9.
Need More Details?
View the full release notes and all changes for OpenTelemetry v1.42.0.
View Full Changelog