Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add a metric which increments when a request is received #2965

Merged
merged 3 commits into from
Mar 12, 2018

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Mar 9, 2018

It's useful to know when there are peaks in incoming requests - which isn't quite the same as there being peaks in outgoing responses, due to the time taken to handle requests.

richvdh added 2 commits March 9, 2018 16:22
rephrase the OPTIONS and unrecognised request handling so that they look
similar to the common flow.
It's useful to know when there are peaks in incoming requests - which isn't
quite the same as there being peaks in outgoing responses, due to the time
taken to handle requests.
@@ -342,7 +350,7 @@ def _send_response(self, request, code, response_json_object,


def _options_handler(request):
return {}
return 200, {}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should have been in dbe80a2, but I'm a crank

@@ -342,7 +350,7 @@ def _send_response(self, request, code, response_json_object,


def _options_handler(request):
return {}
return 200, {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just finding it very confusing to try to guess whether the {} is a response body, or parsed URL segments, or what - especially _get_handler_for_request seems to append its own {} tuple alongside the returned handler... just a snidget of pydoc feels like it would be useful for confused bears

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(especially as it looks like you were confused too, based on missing the 200)

@ara4n
Copy link
Member

ara4n commented Mar 9, 2018

lgtm other than the one commentary request

@richvdh richvdh merged commit ba1d08b into develop Mar 12, 2018
@richvdh richvdh deleted the rav/request_logging branch March 12, 2018 09:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants