mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Use the zipkin headers from utils version 30.0.0
This commit is contained in:
@@ -37,7 +37,7 @@ class NotifyAdminAPIClient(BaseAPIClient):
|
|||||||
def _add_request_id_header(headers):
|
def _add_request_id_header(headers):
|
||||||
if not has_request_context():
|
if not has_request_context():
|
||||||
return headers
|
return headers
|
||||||
headers['NotifyRequestID'] = request.request_id
|
headers['X-B3-TraceId'] = request.request_id
|
||||||
return headers
|
return headers
|
||||||
|
|
||||||
def check_inactive_service(self):
|
def check_inactive_service(self):
|
||||||
|
|||||||
@@ -21,4 +21,4 @@ notifications-python-client==5.0.0
|
|||||||
# PaaS
|
# PaaS
|
||||||
awscli-cwlogs>=1.4,<1.5
|
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
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ notifications-python-client==5.0.0
|
|||||||
# PaaS
|
# PaaS
|
||||||
awscli-cwlogs>=1.4,<1.5
|
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:
|
## The following requirements were added by pip freeze:
|
||||||
awscli==1.15.77
|
awscli==1.15.77
|
||||||
|
|||||||
@@ -99,6 +99,6 @@ def test_generate_headers_sets_request_id_if_in_request_context(app_):
|
|||||||
headers = api_client.generate_headers('api_token')
|
headers = api_client.generate_headers('api_token')
|
||||||
|
|
||||||
assert set(headers.keys()) == {
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user