edx-platform
edx-platform copied to clipboard
feat: TNL-10081 fix logging errors from TNL-10051
This PR is a "Take 2" on PR-10051 (which failed to deply). This PR fixes two earlier problems: 1) call method info
, not Info
, and instrument for performance measurement irrespective of whether blockstore is being called in its IDA or its Django app form.
For completeness, this was the description for PR-10051:
Log before & after making blockstore (Django) API calls to get performance from timestamps
This PR is for ticket https://2u-internal.atlassian.net/browse/TNL-10081, intended to instrument Blockstore as a Django app for performance reasons. This comment references TNL-10081, but the feature name references TNL-10051. TNL-10081 is a subtask of TNL-10051, and, strictly speaking, this PR is for TNL-10081.
The changes contained here will induce logging just before and just after every Blockstore API call. The timestamps on those logs will reveal whether there are any bottlenecks with execution of these API calls.
The syntax of the log messages was tested on an interactive Python shell. There is no automated testing for this logic; confirmation that the tests are as required will occur on the stage environment.