Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tolerate exceptions among experimental resource detectors #4373

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cruisehall
Copy link

@cruisehall cruisehall commented Dec 29, 2024

Description

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. Subsequent resource detector entry points will continue to be processed as well.

Fixes #4268

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit test (test_resource_detector_entry_points_tolerate_missing_detector): Defines two resource detectors in OTEL_EXPERIMENTAL_RESOURCE_DETECTORS; the first ("doesnotexist") does not exist, the second ("host") does exist. Verifies that resource attributes are resolved from the second resource detector.

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

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.
Copy link

linux-foundation-easycla bot commented Dec 29, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@cruisehall cruisehall marked this pull request as ready for review January 3, 2025 04:09
@cruisehall cruisehall requested a review from a team as a code owner January 3, 2025 04:09
@cruisehall cruisehall requested a review from xrmx January 3, 2025 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom ResourceDetector discovery should fail gracefully when entry point not found
2 participants