DefaultClientIdProvider.cpp 707 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <DefaultClientIdProvider.h>
  9. #include <AzCore/Math/Uuid.h>
  10. namespace AWSMetrics
  11. {
  12. DefaultClientIdProvider::DefaultClientIdProvider(const AZStd::string& engineVersion)
  13. {
  14. AZ::Uuid randomUuid = AZ::Uuid::Create();
  15. m_clientId = AZStd::string::format("%s-", engineVersion.c_str());
  16. m_clientId += randomUuid.ToString<AZStd::string>();
  17. }
  18. AZStd::string DefaultClientIdProvider::GetIdentifier() const
  19. {
  20. return m_clientId;
  21. }
  22. }