Skip to content

Commit 508a47b

Browse files
committed
Fixed DSN with a port in stdlib integration
1 parent d1430c6 commit 508a47b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

sentry_sdk/integrations/stdlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def putrequest(self, method, url, *args, **kwargs):
7373

7474
client = sentry_sdk.get_client()
7575
if client.get_integration(StdlibIntegration) is None or is_sentry_url(
76-
client, host
76+
client, f"{host}:{port}"
7777
):
7878
return real_putrequest(self, method, url, *args, **kwargs)
7979

tests/integrations/aws_lambda/test_aws_lambda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def test_environment():
6767

6868
try:
6969
# Wait for SAM to be ready
70-
LocalLambdaStack.wait_for_stack()
70+
LocalLambdaStack.wait_for_stack(log_file=debug_log_file)
7171

7272
def before_test():
7373
server.clear_envelopes()

tests/integrations/aws_lambda/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,16 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
211211
)
212212

213213
@classmethod
214-
def wait_for_stack(cls, timeout=60, port=SAM_PORT):
214+
def wait_for_stack(cls, timeout=60, port=SAM_PORT, log_file=None):
215215
"""
216216
Wait for SAM to be ready, with timeout.
217217
"""
218218
start_time = time.time()
219219
while True:
220220
if time.time() - start_time > timeout:
221221
raise TimeoutError(
222-
"AWS SAM failed to start within %s seconds. (Maybe Docker is not running?)"
223-
% timeout
222+
"AWS SAM failed to start within %s seconds. (Maybe Docker is not running, or new docker images could not be built in time?) Check the log for more details: %s"
223+
% (timeout, log_file)
224224
)
225225

226226
try:

0 commit comments

Comments
 (0)