Adds the request-id middleware to the admin app

- adds a request-id to each request and passes that through to the response
- this is picked up by the loggers and used to tie log events to a request
This commit is contained in:
Martyn Inglis
2016-11-30 16:59:47 +00:00
parent 4161c152ab
commit 1384d2a61c

View File

@@ -25,7 +25,7 @@ from flask_wtf import CsrfProtect
from functools import partial
from notifications_python_client.errors import HTTPError
from notifications_utils import logging
from notifications_utils import logging, request_id
from notifications_utils.recipients import validate_phone_number, InvalidPhoneError
from pygments import highlight
from pygments.formatters.html import HtmlFormatter
@@ -78,6 +78,7 @@ def create_app():
init_app(application)
logging.init_app(application)
init_csrf(application)
request_id.init_app(application)
service_api_client.init_app(application)
user_api_client.init_app(application)