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

[processor/resourcedetection] Add fail_on_missing_metadata to EC2 detector #37453

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Jan 23, 2025

Description

Add fail_on_missing_metadata option on EC2 detector

If the EC2 metadata endpoint is unavailable, the EC2 detector by default ignores the error.
By setting fail_on_missing_metadata to true on the detector, the user will now trigger an error explicitly,
which will stop the collector from starting.

Link to tracking issue

Relates to #35936

Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I wonder if a similar generic option should be available to all resource processors: the fact that one can start and not have the proper attributes can be considered an error in many scenarios.

@atoulme
Copy link
Contributor Author

atoulme commented Jan 29, 2025

LGTM. I wonder if a similar generic option should be available to all resource processors: the fact that one can start and not have the proper attributes can be considered an error in many scenarios.

there is no uniform behavior for all detectors, that can be a followup issue for the processor as a whole.

@atoulme atoulme added the ready to merge Code review completed; ready to merge by maintainers label Jan 30, 2025
@andrzej-stencel
Copy link
Member

@atoulme Can you resolve the conflicts? This is probably the other PR of yours #37451.

@atoulme atoulme force-pushed the ec2_fail_on_missing_metadata branch from 63fb69d to 2bbb8ff Compare January 30, 2025 17:35
@atoulme
Copy link
Contributor Author

atoulme commented Jan 30, 2025

Thanks! Rebased.

@songy23 songy23 merged commit b71d233 into open-telemetry:main Feb 3, 2025
163 checks passed
@github-actions github-actions bot added this to the next release milestone Feb 3, 2025
chengchuanpeng pushed a commit to chengchuanpeng/opentelemetry-collector-contrib that referenced this pull request Feb 8, 2025
…ector (open-telemetry#37453)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Add `fail_on_missing_metadata` option on EC2 detector

If the EC2 metadata endpoint is unavailable, the EC2 detector by default
ignores the error.
By setting `fail_on_missing_metadata` to true on the detector, the user
will now trigger an error explicitly,
which will stop the collector from starting.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Relates to open-telemetry#35936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
processor/resourcedetection Resource detection processor ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants