Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tolerate exceptions among experimental resource detectors (#4373)
* feat: Tolerate exceptions among experimental resource detectors OTEL resource creation will proceed even if one of the resource detector entry points indicated by the `OTEL_EXPERIMENTAL_RESOURCE_DETECTORS` env var fails to load. In fact, subsequent resource detector entry points will continue to be processed as well. * test: 'Resource.create' tolerates missing resource detector * test: Adds additional assertion to 'test_resource_detector_entry_points_tolerate_missing_detector' * chore: Updates CHANGELOG * feat: Logs exception when skipping a resource detector Emulates auto-instrumentation log emitted when an instrumentor fails to load https://github.com/open-telemetry/opentelemetry-python-contrib/blob/v0.50b0/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py#L128 * Update CHANGELOG.md * fix: Corrects var reference to `resource_detector`, removes unused `exc` var * chore: Auto-formats code using 'tox -e ruff' --------- Co-authored-by: Riccardo Magliocchetti <[email protected]> Co-authored-by: Leighton Chen <[email protected]>
- Loading branch information