diff --git a/src/scout_apm/core/config.py b/src/scout_apm/core/config.py index 2e9fc99f..7e22b470 100644 --- a/src/scout_apm/core/config.py +++ b/src/scout_apm/core/config.py @@ -229,7 +229,7 @@ def __init__(self): "core_agent_log_level": "info", "core_agent_permissions": 700, "core_agent_socket_path": "tcp://127.0.0.1:6590", - "core_agent_version": "v1.5.0", # can be an exact tag name, or 'latest' + "core_agent_version": "v1.5.1", # can be an exact tag name, or 'latest' "disabled_instruments": [], "download_url": ( "https://s3-us-west-1.amazonaws.com/scout-public-downloads/" diff --git a/tests/unit/core/samplers/test_cpu.py b/tests/unit/core/samplers/test_cpu.py index 8e8e4cd3..4dc9e64d 100644 --- a/tests/unit/core/samplers/test_cpu.py +++ b/tests/unit/core/samplers/test_cpu.py @@ -3,7 +3,7 @@ import datetime as dt import logging -from psutil._common import pcputimes +import psutil from scout_apm.core.samplers.cpu import Cpu from tests.compat import mock @@ -27,9 +27,12 @@ def test_run_negative_time_elapsed(caplog): def test_run_negative_last_cpu_times(caplog): cpu = Cpu() - cpu.last_cpu_times = pcputimes( - user=1e12, system=1e12, children_user=0.0, children_system=0.0 + # Create a mock cpu_times with very large values for user and system + # Use _replace() to maintain compatibility across different platforms + mock_cpu_times = psutil.Process().cpu_times()._replace( + user=1e12, system=1e12 ) + cpu.last_cpu_times = mock_cpu_times result = cpu.run()