Conversation
Why these changes are being introduced: Lambda functions require a special sentry integration option which we had not previously used so the integration was broken. How this addresses that need: * Adds Sentry lambda integration to ppod module and moves sentry init to top of module as required instead of within the lambda_handler function. * Moves logger instantiation to top of ppod module too. * Adds check for required WORKSPACE env in lambda_handler function. * Adds tests for new functionality. * Removes duplicate line in Dockerfile. * Updates pytest config to set log_level for all tests. Side effects of this change: Exceptions should now be sent to Sentry as expected in all AWS envs. Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/IN-526
ehanson8
approved these changes
Aug 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the broken Sentry integration.
How can a reviewer manually see the effects of these changes?
In the AWS dev account lambda function console, go to the Test tab and test with blank JSON. Then go to Sentry and you should see a new KeyError event from the dev environment.
Includes new or updated dependencies?
NO
What are the relevant tickets?
https://mitlibraries.atlassian.net/browse/IN-526
Developer
Code Reviewer