Skip to content

Commit 324d185

Browse files
authored
Merge pull request #180 from polamayster/issue-167-X-RAY-creates-new-session-with-hardcoded-region
[iss-167] X-RAY creates new session
2 parents 697f06a + f597438 commit 324d185

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

aws_xray_sdk/core/sampling/connector.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,6 @@ def _create_xray_client(self, ip='127.0.0.1', port='2000'):
160160
url = 'http://%s:%s' % (ip, port)
161161
return session.create_client('xray', endpoint_url=url,
162162
region_name='us-west-2',
163-
config=Config(signature_version=UNSIGNED)
163+
config=Config(signature_version=UNSIGNED),
164+
aws_access_key_id='', aws_secret_access_key=''
164165
)

tests/test_recorder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515

1616
@pytest.fixture(autouse=True)
17-
def construct_ctx():
17+
def construct_ctx(monkeypatch):
1818
"""
1919
Clean up context storage before and after each test run.
2020
"""
21+
monkeypatch.delattr("botocore.session.Session.get_credentials")
2122
xray_recorder.configure(sampling=False)
2223
xray_recorder.clear_trace_entities()
2324
yield

0 commit comments

Comments
 (0)