Feature/issue 273 - Modify the logging of the timeseries Lambda response object to reduce the log statement size #274
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.
Github Issue: #273
Description
The timeseries Lambda function logs need to be modified so that the entire response is not logged as this was causing issues with the log ingest into the Cloud Metrics platform. The logs were modified to retain the response status, time, and hits.
The timeseries Lambda function was also modified to log errors more consistently without modifying the error message sent to the end user. The errors are now logged as JSON data with the HTTP code and error message for each error type.
Overview of work done
timeseries.py
to remove logging of response results but retain logging of other response data.timeseries.py
to consistently log all types of errors with an HTTP code and error message. Existing errors returned to end user were preserved to prevent breaking changes.Overview of verification done
Overview of integration done
compact
query parameter.Sample log for response data:
Sample log for error data:
PR checklist:
See Pull Request Review Checklist for pointers on reviewing this pull request