Use the zipkin headers from utils version 30.0.0

This commit is contained in:
Athanasios Voutsadakis
2018-08-14 12:00:23 +01:00
parent 3fd81491d1
commit 6786ff8fde
4 changed files with 5 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ class NotifyAdminAPIClient(BaseAPIClient):
def _add_request_id_header(headers):
if not has_request_context():
return headers
headers['NotifyRequestID'] = request.request_id
headers['X-B3-TraceId'] = request.request_id
return headers
def check_inactive_service(self):

View File

@@ -21,4 +21,4 @@ notifications-python-client==5.0.0
# PaaS
awscli-cwlogs>=1.4,<1.5
git+https://github.com/alphagov/notifications-utils.git@29.3.6#egg=notifications-utils==29.3.6
git+https://github.com/alphagov/notifications-utils.git@30.0.0#egg=notifications-utils==30.0.0

View File

@@ -23,7 +23,7 @@ notifications-python-client==5.0.0
# PaaS
awscli-cwlogs>=1.4,<1.5
git+https://github.com/alphagov/notifications-utils.git@29.3.6#egg=notifications-utils==29.3.6
git+https://github.com/alphagov/notifications-utils.git@30.0.0#egg=notifications-utils==30.0.0
## The following requirements were added by pip freeze:
awscli==1.15.77

View File

@@ -99,6 +99,6 @@ def test_generate_headers_sets_request_id_if_in_request_context(app_):
headers = api_client.generate_headers('api_token')
assert set(headers.keys()) == {
'Authorization', 'Content-type', 'User-agent', 'X-Custom-Forwarder', 'NotifyRequestID'
'Authorization', 'Content-type', 'User-agent', 'X-Custom-Forwarder', 'X-B3-TraceId'
}
assert headers['NotifyRequestID'] == request_context.request.request_id
assert headers['X-B3-TraceId'] == request_context.request.request_id