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

test: Add logging for relevant Amazon headers useful for debugging #2390

Merged
merged 4 commits into from
May 27, 2022

Conversation

mildaniel
Copy link
Contributor

Description of changes:

We've seen errors in APIGW requests before that we haven't been able to debug since we haven't logged the necessary request IDs. This PR adds some filtering to extract relevant headers for all requests to APIGW and log them to the console.

Unfortunately, since the requests and urllib3 libraries don't use Python's logger module, we have to add some custom logic here to log the relevant headers.

Relevant link: https://stackoverflow.com/questions/16337511/log-all-requests-from-the-python-requests-module

Checklist:

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

@mildaniel mildaniel merged commit ee714d5 into aws:develop May 27, 2022
@mildaniel mildaniel deleted the request-header-logging branch May 27, 2022 21:08
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.

None yet

3 participants