Skip to content

Log IMDS response full text when status code not in 200 range #645

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

Merged
merged 2 commits into from
May 26, 2022

Conversation

snay2
Copy link
Contributor

@snay2 snay2 commented May 25, 2022

Issue #, if available: N/A

Description of changes:

Sometimes IMDS may return non-200 status codes. We'd like to see the body of the response in those scenarios, in case there may be useful debugging data there.

Restructured the GetMetadataInfo() function to print response body with debug-level logging.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@snay2 snay2 requested a review from a team as a code owner May 25, 2022 18:23
AustinSiu
AustinSiu previously approved these changes May 25, 2022
@snay2 snay2 force-pushed the response-logging branch from 5e7623f to a1e63e0 Compare May 26, 2022 14:25
Copy link
Contributor

@brycahta brycahta left a comment

Choose a reason for hiding this comment

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

/lgtm

@snay2 snay2 merged commit 0a61ead into aws:main May 26, 2022
@snay2 snay2 deleted the response-logging branch May 26, 2022 16:55
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.

3 participants