From 1384d2a61c46a556d9dbba2b88902176d32ff969 Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Wed, 30 Nov 2016 16:59:47 +0000 Subject: [PATCH] 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 --- app/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/__init__.py b/app/__init__.py index 88e2e8d25..d6e37e6a4 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -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)