Skip to content

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.

3 participants