diff --git a/tests/testing-resources/include/aws/testing/mocks/monitoring/TestingMonitoring.h b/tests/testing-resources/include/aws/testing/mocks/monitoring/TestingMonitoring.h index 0902b72d632..177c9ef65f9 100644 --- a/tests/testing-resources/include/aws/testing/mocks/monitoring/TestingMonitoring.h +++ b/tests/testing-resources/include/aws/testing/mocks/monitoring/TestingMonitoring.h @@ -83,6 +83,8 @@ class TestingMonitoring : public Aws::Monitoring::MonitoringInterface AWS_UNREFERENCED_PARAM(serviceName); AWS_UNREFERENCED_PARAM(requestName); AWS_UNREFERENCED_PARAM(context); + std::unique_lock locker(s_lastMutex); + TestingMonitoringMetrics::s_lastUriString = request->GetUri().GetURIString().c_str(); TestingMonitoringMetrics::s_lastSigningRegion = request->GetSigningRegion().c_str(); Aws::Vector authComponents = request->HasAwsAuthorization() ? @@ -155,6 +157,7 @@ class TestingMonitoringManager private: static void Init() { + std::unique_lock locker(s_lastMutex); TestingMonitoringMetrics::Config::s_enablePayload = false; TestingMonitoringMetrics::s_lastUriString = "";