Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iss-167] X-RAY creates new session #180

3 changes: 2 additions & 1 deletion aws_xray_sdk/core/sampling/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,6 @@ def _create_xray_client(self, ip='127.0.0.1', port='2000'):
url = 'http://%s:%s' % (ip, port)
return session.create_client('xray', endpoint_url=url,
region_name='us-west-2',
config=Config(signature_version=UNSIGNED)
config=Config(signature_version=UNSIGNED),
aws_access_key_id='', aws_secret_access_key=''
)
3 changes: 2 additions & 1 deletion tests/test_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@


@pytest.fixture(autouse=True)
def construct_ctx():
def construct_ctx(monkeypatch):
"""
Clean up context storage before and after each test run.
"""
monkeypatch.delattr("botocore.session.Session.get_credentials")
xray_recorder.configure(sampling=False)
xray_recorder.clear_trace_entities()
yield
Expand Down