Changes names to Events SDK
This commit is contained in:
Родитель
b94b38e6eb
Коммит
022572cb47
|
@ -19,7 +19,7 @@
|
|||
#include "Enums.hpp"
|
||||
#include "CorrelationVector.hpp"
|
||||
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
using namespace std;
|
||||
|
||||
NativeLogger::NativeLogger() : m_pLogger(nullptr), m_eventCount(0)
|
||||
|
|
|
@ -81,7 +81,7 @@ void SetThreadName(const char* threadName)
|
|||
|
||||
|
||||
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
//using namespace ARIASDK_NS_BEGIN;
|
||||
using namespace std;
|
||||
|
||||
|
@ -493,7 +493,7 @@ ILogger* init() {
|
|||
configuration.SetBoolProperty(CFG_BOOL_ENABLE_DB_COMPRESS, true);
|
||||
configuration.SetBoolProperty(CFG_BOOL_ENABLE_WAL_JOURNAL, false);
|
||||
configuration.SetIntProperty(CFG_INT_MAX_PKG_DROP_ON_FULL, 20);
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
std::string temp = configuration.GetProperty("dsadasdsad", error);
|
||||
|
||||
// Force UTC uploader on Windows 10 even if it's not RS2
|
||||
|
|
|
@ -86,7 +86,7 @@ void SetThreadName(const char* threadName)
|
|||
|
||||
|
||||
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
//using namespace ARIASDK_NS_BEGIN;
|
||||
using namespace std;
|
||||
|
||||
|
@ -501,7 +501,7 @@ ILogger* init() {
|
|||
configuration.SetBoolProperty(CFG_BOOL_ENABLE_DB_COMPRESS, true);
|
||||
configuration.SetBoolProperty(CFG_BOOL_ENABLE_WAL_JOURNAL, false);
|
||||
configuration.SetIntProperty(CFG_INT_MAX_PKG_DROP_ON_FULL, 20);
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
std::string temp = configuration.GetProperty("dsadasdsad", error);
|
||||
|
||||
// Force UTC uploader on Windows 10 even if it's not RS2
|
||||
|
|
Двоичные данные
Solutions/VersionInfo.rc
Двоичные данные
Solutions/VersionInfo.rc
Двоичный файл не отображается.
|
@ -7,7 +7,7 @@
|
|||
#include <cassert>
|
||||
|
||||
using namespace std;
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
using namespace Microsoft::Applications::Experimentation::AFD;
|
||||
|
||||
const std::string TEST_CLIENT_NAME = "word3";// "C2CPlugin";
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
using namespace Microsoft::Applications::Experimentation::AFD;
|
||||
|
||||
const std::string tenantToken = "6d084bbf6a9644ef83f40a77c9e34580-c2d379e0-4408-4325-9b4d-2a7d78131e14-7322";
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <cassert>
|
||||
|
||||
using namespace std;
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
using namespace Microsoft::Applications::Experimentation::ECS;
|
||||
|
||||
const std::string TEST_CLIENT_NAME = "Skype";
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
using namespace Microsoft::Applications::Experimentation::ECS;
|
||||
|
||||
const std::string tenantToken = "6d084bbf6a9644ef83f40a77c9e34580-c2d379e0-4408-4325-9b4d-2a7d78131e14-7322";
|
||||
|
|
|
@ -12,7 +12,7 @@ using namespace System::Security::Permissions;
|
|||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly:AssemblyTitleAttribute(L"Microsoft.Applications.Telemetry.Windows")];
|
||||
[assembly:AssemblyTitleAttribute(L"Microsoft.Applications.Events .Windows")];
|
||||
[assembly:AssemblyDescriptionAttribute(L"Microsoft data file")];
|
||||
[assembly:AssemblyConfigurationAttribute(L"Retail")];
|
||||
[assembly:AssemblyCompanyAttribute(L"Microsoft")];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
namespace Windows
|
||||
{
|
||||
DateTime SetPlatformDateTime(int64_t universalTime)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<ProjectGuid>{DC91621E-A203-42DF-8E03-3A23DD0602B1}</ProjectGuid>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<Keyword>ManagedCProj</Keyword>
|
||||
<RootNamespace>Microsoft.Applications.Telemetry.Windows</RootNamespace>
|
||||
<RootNamespace>Microsoft.Applications.Events.Windows</RootNamespace>
|
||||
<ProjectName>net40</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ExtensionsToDeleteOnClean>*.cdf;*.cache;*.obj;*.pdb;*.obj.enc;*.ilk;*.ipdb;*.iobj;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.metagen;*.bi</ExtensionsToDeleteOnClean>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<ProjectGuid>{49077DBF-E363-4D2D-8334-636569A771B6}</ProjectGuid>
|
||||
<Keyword>WindowsRuntimeComponent</Keyword>
|
||||
<ProjectName>win10-cs</ProjectName>
|
||||
<RootNamespace>Microsoft.Applications.Telemetry.Windows</RootNamespace>
|
||||
<RootNamespace>Microsoft.Applications.Events.Windows</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
|
@ -94,7 +94,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<GenerateManifest>true</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir);</IncludePath>
|
||||
<OutDir>$(ProjectDir)..\out\$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(ProjectDir)..\out\obj\$(ProjectName)\$(Configuration)\$(Platform)\</IntDir>
|
||||
|
@ -103,7 +103,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<GenerateManifest>true</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir);</IncludePath>
|
||||
<OutDir>$(ProjectDir)..\out\$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(ProjectDir)..\out\obj\$(ProjectName)\$(Configuration)\$(Platform)\</IntDir>
|
||||
|
@ -112,7 +112,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir);</IncludePath>
|
||||
<OutDir>$(ProjectDir)..\out\$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(ProjectDir)..\out\obj\$(ProjectName)\$(Configuration)\$(Platform)\</IntDir>
|
||||
|
@ -121,7 +121,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<GenerateManifest>true</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir);</IncludePath>
|
||||
<OutDir>$(ProjectDir)..\out\$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(ProjectDir)..\out\obj\$(ProjectName)\$(Configuration)\$(Platform)\</IntDir>
|
||||
|
@ -130,7 +130,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<GenerateManifest>true</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir);</IncludePath>
|
||||
<OutDir>$(ProjectDir)..\out\$(Configuration)\$(Platform)\$(ProjectName)</OutDir>
|
||||
<IntDir>$(ProjectDir)..\out\obj\$(ProjectName)\$(Configuration)\$(Platform)\</IntDir>
|
||||
|
@ -139,7 +139,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<GenerateManifest>true</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir);</IncludePath>
|
||||
<OutDir>$(ProjectDir)..\out\$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(ProjectDir)..\out\obj\$(ProjectName)\$(Configuration)\$(Platform)\</IntDir>
|
||||
|
|
|
@ -93,37 +93,37 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>Microsoft.Applications.Telemetry.Windows</TargetName>
|
||||
<TargetName>Microsoft.Applications.Events.Windows</TargetName>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
|
|
|
@ -14,4 +14,7 @@
|
|||
<ItemGroup>
|
||||
<ResourceCompile Include="..\VersionInfo.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
namespace ARIASDK_NS_BEGIN {
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(AuthTokensController, "AriaSDK.AuthTokensController", "Aria telemetry client - AuthTokensController class");
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(AuthTokensController, "EventsSDK.AuthTokensController", "Events telemetry client - AuthTokensController class");
|
||||
|
||||
AuthTokensController::AuthTokensController()
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ AuthTokensController::~AuthTokensController()
|
|||
ARIASDK_LOG_INFO("destructor");
|
||||
}
|
||||
|
||||
ACTStatus AuthTokensController::SetTicketToken(TicketType type, char const* tokenValue)
|
||||
EVTStatus AuthTokensController::SetTicketToken(TicketType type, char const* tokenValue)
|
||||
{
|
||||
if (nullptr != tokenValue)
|
||||
{
|
||||
|
@ -33,9 +33,9 @@ ACTStatus AuthTokensController::SetTicketToken(TicketType type, char const* tok
|
|||
m_tickets.push_back(TICKETS_PREPAND_STRING + std::to_string(type));
|
||||
m_userTokens[type] = std::string(tokenValue);
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
return ACTStatus::ACTStatus_Fail;
|
||||
return EVTStatus::EVTStatus_Fail;
|
||||
}
|
||||
|
||||
std::vector<std::string>& AuthTokensController::GetTickets()
|
||||
|
@ -52,4 +52,4 @@ std::map<TicketType, std::string>& AuthTokensController::GetUserTokens()
|
|||
{
|
||||
return m_userTokens;
|
||||
}
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <vector>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ class AuthTokensController : public IAuthTokensController
|
|||
/// </summary>
|
||||
/// <param name="type">Ticket type</param>
|
||||
/// <param name="ticketValue">Ticketvalue</param>
|
||||
virtual ACTStatus SetTicketToken(TicketType type, char const* tokenValue);
|
||||
virtual EVTStatus SetTicketToken(TicketType type, char const* tokenValue);
|
||||
|
||||
/// <summary>
|
||||
/// Set the Auth ticket.
|
||||
|
@ -62,4 +62,4 @@ class AuthTokensController : public IAuthTokensController
|
|||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -12,7 +12,7 @@ using namespace std;
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
|
||||
std::mutex* our_CommonLogManagerInternallockP = new std::mutex();
|
||||
ILogManagerInternal* our_pLogManagerSingletonInstanceP = nullptr;
|
||||
|
@ -41,10 +41,10 @@ namespace Microsoft {
|
|||
return false;
|
||||
}
|
||||
|
||||
ACTStatus CommonLogManagerInternal::Initialize( LogConfiguration* logConfigurationP, bool wantController)
|
||||
EVTStatus CommonLogManagerInternal::Initialize( LogConfiguration* logConfigurationP, bool wantController)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("Initialize[1]:configuration=0x%X", logConfigurationP);
|
||||
ACTStatus status = ACTStatus::ACTStatus_OK;
|
||||
EVTStatus status = EVTStatus::EVTStatus_OK;
|
||||
|
||||
if (InterlockedIncrementAcquire(&our_CommonLogManagerInternalStarted) == 1)
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ namespace Microsoft {
|
|||
|
||||
if (nullptr == our_LogSessionDataP)
|
||||
{
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
our_LogSessionDataP = new LogSessionData(our_LogConfiguration->GetProperty(CFG_STR_CACHE_FILE_PATH, error));
|
||||
}
|
||||
if (wantController & !our_IsRuningasHost)
|
||||
|
@ -100,7 +100,7 @@ namespace Microsoft {
|
|||
{
|
||||
if (wantController)
|
||||
{
|
||||
status = ACTStatus::ACTStatus_AlreadyInitialized;
|
||||
status = EVTStatus::EVTStatus_AlreadyInitialized;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ namespace Microsoft {
|
|||
return status;
|
||||
}
|
||||
|
||||
ACTStatus CommonLogManagerInternal::FlushAndTeardown()
|
||||
EVTStatus CommonLogManagerInternal::FlushAndTeardown()
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("FlushAndTeardown()");
|
||||
if (InterlockedDecrementAcquire(&our_CommonLogManagerInternalStarted) == 0)
|
||||
|
@ -147,86 +147,86 @@ namespace Microsoft {
|
|||
}
|
||||
else
|
||||
{
|
||||
ACTStatus::ACTStatus_NoOp;
|
||||
EVTStatus::EVTStatus_NoOp;
|
||||
}
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
ACTStatus CommonLogManagerInternal::UploadNow()
|
||||
EVTStatus CommonLogManagerInternal::UploadNow()
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("UploadNow()");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->UploadNow();
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save all unsent records to offline storage.
|
||||
/// </summary>
|
||||
ACTStatus CommonLogManagerInternal::Flush()
|
||||
EVTStatus CommonLogManagerInternal::Flush()
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("Flush()");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->Flush();
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pause telemetry event transmission
|
||||
/// </summary>
|
||||
ACTStatus CommonLogManagerInternal::PauseTransmission()
|
||||
EVTStatus CommonLogManagerInternal::PauseTransmission()
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("PauseTransmission()");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->PauseTransmission();
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resume telemetry event transmission
|
||||
/// </summary>
|
||||
ACTStatus CommonLogManagerInternal::ResumeTransmission()
|
||||
EVTStatus CommonLogManagerInternal::ResumeTransmission()
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("ResumeTransmission()");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->ResumeTransmission();
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select one of several predefined transmission profiles.
|
||||
/// </summary>
|
||||
/// <param name="profile"></param>
|
||||
ACTStatus CommonLogManagerInternal::SetTransmitProfile(TransmitProfile profile)
|
||||
EVTStatus CommonLogManagerInternal::SetTransmitProfile(TransmitProfile profile)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("SetTransmitProfile: profile=%d", profile);
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->SetTransmitProfile(profile);
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select one of several predefined transmission profiles.
|
||||
/// </summary>
|
||||
/// <param name="profile"></param>
|
||||
ACTStatus CommonLogManagerInternal::SetTransmitProfile(const std::string& profile)
|
||||
EVTStatus CommonLogManagerInternal::SetTransmitProfile(const std::string& profile)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("SetTransmitProfile: profile=%s", profile.c_str());
|
||||
if (TransmitProfiles::setProfile(profile))
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
else
|
||||
return ACTStatus::ACTStatus_Fail;
|
||||
return EVTStatus::EVTStatus_Fail;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -234,23 +234,23 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="profiles_json">JSON config (see example above)</param>
|
||||
/// <returns>true on successful profiles load, false if config is invalid</returns>
|
||||
ACTStatus CommonLogManagerInternal::LoadTransmitProfiles(const std::string& profiles_json)
|
||||
EVTStatus CommonLogManagerInternal::LoadTransmitProfiles(const std::string& profiles_json)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("LoadTransmitProfiles");
|
||||
if (TransmitProfiles::load(profiles_json))
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
else
|
||||
return ACTStatus::ACTStatus_Fail;
|
||||
return EVTStatus::EVTStatus_Fail;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset transmission profiles to default settings
|
||||
/// </summary>
|
||||
ACTStatus CommonLogManagerInternal::ResetTransmitProfiles()
|
||||
EVTStatus CommonLogManagerInternal::ResetTransmitProfiles()
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("ResetTransmitProfiles");
|
||||
TransmitProfiles::reset();
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
const std::string& CommonLogManagerInternal::GetTransmitProfileName()
|
||||
|
@ -284,7 +284,7 @@ namespace Microsoft {
|
|||
/// <param name="value">value</param>
|
||||
/// <param name="piiKind">Pii kind</param>
|
||||
template <typename T>
|
||||
ACTStatus CommonLogManagerInternal::_SetContext(const string& name, T value, PiiKind piiKind)
|
||||
EVTStatus CommonLogManagerInternal::_SetContext(const string& name, T value, PiiKind piiKind)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("SetContext");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
|
@ -299,14 +299,14 @@ namespace Microsoft {
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus CommonLogManagerInternal::SetContext(const std::string& name, const std::string& value, PiiKind piiKind)
|
||||
EVTStatus CommonLogManagerInternal::SetContext(const std::string& name, const std::string& value, PiiKind piiKind)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("SetContext");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->SetContext(name, value, piiKind);
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -315,13 +315,13 @@ namespace Microsoft {
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus CommonLogManagerInternal::SetContext(const std::string& name, double value, PiiKind piiKind) {
|
||||
EVTStatus CommonLogManagerInternal::SetContext(const std::string& name, double value, PiiKind piiKind) {
|
||||
ARIASDK_LOG_DETAIL("SetContext");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->SetContext(name, value, piiKind);
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -330,13 +330,13 @@ namespace Microsoft {
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus CommonLogManagerInternal::SetContext(const std::string& name, int64_t value, PiiKind piiKind) {
|
||||
EVTStatus CommonLogManagerInternal::SetContext(const std::string& name, int64_t value, PiiKind piiKind) {
|
||||
ARIASDK_LOG_DETAIL("SetContext");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->SetContext(name, value, piiKind);
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -345,13 +345,13 @@ namespace Microsoft {
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus CommonLogManagerInternal::SetContext(const std::string& name, bool value, PiiKind piiKind) {
|
||||
EVTStatus CommonLogManagerInternal::SetContext(const std::string& name, bool value, PiiKind piiKind) {
|
||||
ARIASDK_LOG_DETAIL("SetContext");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->SetContext(name, value, piiKind);
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -360,13 +360,13 @@ namespace Microsoft {
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus CommonLogManagerInternal::SetContext(const std::string& name, time_ticks_t value, PiiKind piiKind) {
|
||||
EVTStatus CommonLogManagerInternal::SetContext(const std::string& name, time_ticks_t value, PiiKind piiKind) {
|
||||
ARIASDK_LOG_DETAIL("SetContext");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->SetContext(name, value, piiKind);
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -375,13 +375,13 @@ namespace Microsoft {
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus CommonLogManagerInternal::SetContext(const std::string& name, GUID_t value, PiiKind piiKind) {
|
||||
EVTStatus CommonLogManagerInternal::SetContext(const std::string& name, GUID_t value, PiiKind piiKind) {
|
||||
ARIASDK_LOG_DETAIL("SetContext");
|
||||
if (nullptr != our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
our_pLogManagerSingletonInstanceP->SetContext(name, value, piiKind);
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
ILogger* CommonLogManagerInternal::GetLogger(const std::string& tenantToken, ContextFieldsProvider* context)
|
||||
|
@ -406,7 +406,7 @@ namespace Microsoft {
|
|||
}
|
||||
}
|
||||
|
||||
__inline ACTStatus CommonLogManagerInternal::checkup() { };
|
||||
__inline EVTStatus CommonLogManagerInternal::checkup() { };
|
||||
|
||||
/// <summary>Debug callback implementation</summary>
|
||||
static DebugEventSource debugEventSource;
|
||||
|
@ -414,19 +414,19 @@ namespace Microsoft {
|
|||
/// <summary>Add debug event listener.</summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="listener"></param>
|
||||
ACTStatus CommonLogManagerInternal::AddEventListener(DebugEventType type, DebugEventListener &listener)
|
||||
EVTStatus CommonLogManagerInternal::AddEventListener(DebugEventType type, DebugEventListener &listener)
|
||||
{
|
||||
debugEventSource.AddEventListener(type, listener);
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>Remove debug event listener.</summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="listener"></param>
|
||||
ACTStatus CommonLogManagerInternal::RemoveEventListener(DebugEventType type, DebugEventListener &listener)
|
||||
EVTStatus CommonLogManagerInternal::RemoveEventListener(DebugEventType type, DebugEventListener &listener)
|
||||
{
|
||||
debugEventSource.RemoveEventListener(type, listener);
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>[internal] Dispatch debug event to debug event listener.</summary>
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
|
||||
/// <summary>
|
||||
/// This class is used to manage the Telemetry logging system
|
||||
/// This class is used to manage the Events logging system
|
||||
/// </summary>
|
||||
class CommonLogManagerInternal
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="tenantToken">Token of the tenant with which the application is associated for collecting telemetry</param>
|
||||
/// <returns>A logger instance instantiated with the tenantToken</returns>
|
||||
static ACTStatus Initialize(
|
||||
static EVTStatus Initialize(
|
||||
#ifdef ANDROID
|
||||
JNIEnv *env,
|
||||
jclass contextClass,
|
||||
|
@ -51,12 +51,12 @@ namespace Microsoft {
|
|||
/// <summary>
|
||||
/// Flush any pending telemetry events in memory to disk and tear down the telemetry logging system.
|
||||
/// </summary>
|
||||
static ACTStatus FlushAndTeardown();
|
||||
static EVTStatus FlushAndTeardown();
|
||||
|
||||
/// <summary>
|
||||
/// Try to send any pending telemetry events in memory or on disk.
|
||||
/// </summary>
|
||||
static ACTStatus UploadNow();
|
||||
static EVTStatus UploadNow();
|
||||
|
||||
/// <summary>
|
||||
/// Flush any pending telemetry events in memory to disk to reduce possible data loss as seen necessary.
|
||||
|
@ -64,18 +64,18 @@ namespace Microsoft {
|
|||
/// and might flush the global file buffers, i.e. all buffered filesystem data, to disk, which could be
|
||||
/// time consuming.
|
||||
/// </summary>
|
||||
static ACTStatus Flush();
|
||||
static EVTStatus Flush();
|
||||
|
||||
/// <summary>
|
||||
/// Pauses the transmission of events to data collector.
|
||||
/// While pasued events will continue to be queued up on client side in cache (either in memory or on disk file).
|
||||
/// </summary>
|
||||
static ACTStatus PauseTransmission();
|
||||
static EVTStatus PauseTransmission();
|
||||
|
||||
/// <summary>
|
||||
/// Resumes the transmission of events to data collector.
|
||||
/// </summary>
|
||||
static ACTStatus ResumeTransmission();
|
||||
static EVTStatus ResumeTransmission();
|
||||
|
||||
/// <summary>
|
||||
/// Sets transmit profile for event transmission to one of the built-in profiles.
|
||||
|
@ -84,7 +84,7 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="profile">Transmit profile</param>
|
||||
/// <returns>This function doesn't return any value because it always succeeds.</returns>
|
||||
static ACTStatus SetTransmitProfile(TransmitProfile profile);
|
||||
static EVTStatus SetTransmitProfile(TransmitProfile profile);
|
||||
#ifndef ANDROID
|
||||
/// <summary>
|
||||
/// Sets transmit profile for event transmission.
|
||||
|
@ -93,19 +93,19 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="profile">Transmit profile</param>
|
||||
/// <returns>true if profile is successfully applied, false otherwise</returns>
|
||||
static ACTStatus SetTransmitProfile(const std::string& profile);
|
||||
static EVTStatus SetTransmitProfile(const std::string& profile);
|
||||
|
||||
/// <summary>
|
||||
/// Load transmit profiles from JSON config
|
||||
/// </summary>
|
||||
/// <param name="profiles_json">JSON config (see example above)</param>
|
||||
/// <returns>true on successful profiles load, false if config is invalid</returns>
|
||||
static ACTStatus LoadTransmitProfiles(const std::string& profiles_json);
|
||||
static EVTStatus LoadTransmitProfiles(const std::string& profiles_json);
|
||||
|
||||
/// <summary>
|
||||
/// Reset transmission profiles to default settings
|
||||
/// </summary>
|
||||
static ACTStatus ResetTransmitProfiles();
|
||||
static EVTStatus ResetTransmitProfiles();
|
||||
|
||||
/// <summary>Get profile name based on built-in profile enum<summary>
|
||||
/// <param name="profile">Transmit profile</param>
|
||||
|
@ -128,7 +128,7 @@ namespace Microsoft {
|
|||
/// <param name="name">Name of the context property</param>
|
||||
/// <param name="value">Value of the context property</param>
|
||||
/// <param name='piiKind'>PIIKind of the context with PiiKind_None as the default</param>
|
||||
static ACTStatus SetContext(const std::string& name, const std::string& value, PiiKind piiKind = PiiKind_None);
|
||||
static EVTStatus SetContext(const std::string& name, const std::string& value, PiiKind piiKind = PiiKind_None);
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the custom context for the telemetry logging system.
|
||||
|
@ -138,21 +138,21 @@ namespace Microsoft {
|
|||
/// <param name="name">Name of the context property</param>
|
||||
/// <param name="value">Value of the context property</param>
|
||||
/// <param name='piiKind'>PIIKind of the context with PiiKind_None as the default</param>
|
||||
static ACTStatus SetContext(const std::string& name, const char *value, PiiKind piiKind = PiiKind_None) { const std::string val(value); SetContext(name, val, piiKind); };
|
||||
static EVTStatus SetContext(const std::string& name, const char *value, PiiKind piiKind = PiiKind_None) { const std::string val(value); SetContext(name, val, piiKind); };
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">Double value of the property</param>
|
||||
static ACTStatus SetContext(const std::string& name, double value, PiiKind piiKind = PiiKind_None);
|
||||
static EVTStatus SetContext(const std::string& name, double value, PiiKind piiKind = PiiKind_None);
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">64-bit Integer value of the property</param>
|
||||
static ACTStatus SetContext(const std::string& name, int64_t value, PiiKind piiKind = PiiKind_None);
|
||||
static EVTStatus SetContext(const std::string& name, int64_t value, PiiKind piiKind = PiiKind_None);
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.<br>
|
||||
|
@ -160,7 +160,7 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">8-bit Integer value of the property</param>
|
||||
static inline ACTStatus SetContext(const std::string& name, int8_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
static inline EVTStatus SetContext(const std::string& name, int8_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.<br>
|
||||
|
@ -168,7 +168,7 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">16-bit Integer value of the property</param>
|
||||
static inline ACTStatus SetContext(const std::string& name, int16_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
static inline EVTStatus SetContext(const std::string& name, int16_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.<br>
|
||||
|
@ -176,7 +176,7 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">32-bit Integer value of the property</param>
|
||||
static inline ACTStatus SetContext(const std::string& name, int32_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
static inline EVTStatus SetContext(const std::string& name, int32_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.<br>
|
||||
|
@ -184,7 +184,7 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">8-bit unsigned integer value of the property</param>
|
||||
static inline ACTStatus SetContext(const std::string& name, uint8_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
static inline EVTStatus SetContext(const std::string& name, uint8_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.<br>
|
||||
|
@ -192,7 +192,7 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">16-bit unsigned integer value of the property</param>
|
||||
static inline ACTStatus SetContext(const std::string& name, uint16_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
static inline EVTStatus SetContext(const std::string& name, uint16_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.<br>
|
||||
|
@ -200,7 +200,7 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">32-bit unsigned integer value of the property</param>
|
||||
static inline ACTStatus SetContext(const std::string& name, uint32_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
static inline EVTStatus SetContext(const std::string& name, uint32_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.<br>
|
||||
|
@ -208,28 +208,28 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">64-bit unsigned integer value of the property</param>
|
||||
static inline ACTStatus SetContext(const std::string& name, uint64_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
static inline EVTStatus SetContext(const std::string& name, uint64_t value, PiiKind piiKind = PiiKind_None) { SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">Boolean value of the property</param>
|
||||
static ACTStatus SetContext(const std::string& name, bool value, PiiKind piiKind = PiiKind_None);
|
||||
static EVTStatus SetContext(const std::string& name, bool value, PiiKind piiKind = PiiKind_None);
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">.NET time ticks</param>
|
||||
static ACTStatus SetContext(const std::string& name, time_ticks_t value, PiiKind piiKind = PiiKind_None);
|
||||
static EVTStatus SetContext(const std::string& name, time_ticks_t value, PiiKind piiKind = PiiKind_None);
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">GUID</param>
|
||||
static ACTStatus SetContext(const std::string& name, GUID_t value, PiiKind piiKind = PiiKind_None);
|
||||
static EVTStatus SetContext(const std::string& name, GUID_t value, PiiKind piiKind = PiiKind_None);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the ILogger interface of a Logger instance through which to log telemetry event.
|
||||
|
@ -246,12 +246,12 @@ namespace Microsoft {
|
|||
/// <summary>
|
||||
/// Add Debug callback
|
||||
/// </summary>
|
||||
static ACTStatus AddEventListener(DebugEventType type, DebugEventListener &listener);
|
||||
static EVTStatus AddEventListener(DebugEventType type, DebugEventListener &listener);
|
||||
|
||||
/// <summary>
|
||||
/// Remove Debug callback
|
||||
/// </summary>
|
||||
static ACTStatus RemoveEventListener(DebugEventType type, DebugEventListener &listener);
|
||||
static EVTStatus RemoveEventListener(DebugEventType type, DebugEventListener &listener);
|
||||
|
||||
/// <summary>
|
||||
/// Dispatch debug event
|
||||
|
@ -297,7 +297,7 @@ namespace Microsoft {
|
|||
/// <summary>
|
||||
/// Debug routine that validates if CommonLogManagerInternal has been initialized. May trigger a warning message if not.
|
||||
/// </summary>
|
||||
static ACTStatus checkup();
|
||||
static EVTStatus checkup();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
namespace ARIASDK_NS_BEGIN {
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(HostGuestLogManager, "AriaSDK.HostGuestLogManager", "Aria telemetry client - HostGuestLogManager class");
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(HostGuestLogManager, "EventsSDK.HostGuestLogManager", "Events telemetry client - HostGuestLogManager class");
|
||||
|
||||
HostGuestLogManager::HostGuestLogManager(LogConfiguration* config, bool wantController)
|
||||
:m_logController(nullptr)
|
||||
|
@ -15,7 +15,7 @@ HostGuestLogManager::HostGuestLogManager(LogConfiguration* config, bool wantCont
|
|||
ARIASDK_LOG_DETAIL("New HostGuestLogManager instance");
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_lock);
|
||||
if (ACTStatus::ACTStatus_OK == CommonLogManagerInternal::Initialize(config, wantController) && wantController)
|
||||
if (EVTStatus::EVTStatus_OK == CommonLogManagerInternal::Initialize(config, wantController) && wantController)
|
||||
{//create controller, wanted host and created as host
|
||||
m_logController = new LogController();
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ HostGuestLogManager::HostGuestLogManager(bool wantController)
|
|||
ARIASDK_LOG_DETAIL("New HostGuestLogManager instance");
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_lock);
|
||||
if (ACTStatus::ACTStatus_OK == CommonLogManagerInternal::Initialize(nullptr, wantController) && wantController)
|
||||
if (EVTStatus::EVTStatus_OK == CommonLogManagerInternal::Initialize(nullptr, wantController) && wantController)
|
||||
{//create controller, wanted host and created as host
|
||||
m_logController = new LogController();
|
||||
}
|
||||
|
@ -74,12 +74,12 @@ IAuthTokensController* HostGuestLogManager::GetAuthTokensController()
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus HostGuestLogManager::SetContext(std::string const& name, std::string const& value, PiiKind piiKind)
|
||||
EVTStatus HostGuestLogManager::SetContext(std::string const& name, std::string const& value, PiiKind piiKind)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("SetContext(\"%s\", ..., %u)", name.c_str(), piiKind);
|
||||
EventProperty prop(value, piiKind);
|
||||
m_context->setCustomField(name, prop);
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -88,12 +88,12 @@ ACTStatus HostGuestLogManager::SetContext(std::string const& name, std::string c
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus HostGuestLogManager::SetContext(const std::string& name, double value, PiiKind piiKind)
|
||||
EVTStatus HostGuestLogManager::SetContext(const std::string& name, double value, PiiKind piiKind)
|
||||
{
|
||||
ARIASDK_LOG_INFO("SetContext");
|
||||
EventProperty prop(value, piiKind);
|
||||
m_context->setCustomField(name, prop);
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,11 +102,11 @@ ACTStatus HostGuestLogManager::SetContext(const std::string& name, double value,
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus HostGuestLogManager::SetContext(const std::string& name, int64_t value, PiiKind piiKind) {
|
||||
EVTStatus HostGuestLogManager::SetContext(const std::string& name, int64_t value, PiiKind piiKind) {
|
||||
ARIASDK_LOG_INFO("SetContext");
|
||||
EventProperty prop(value, piiKind);
|
||||
m_context->setCustomField(name, prop);
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -115,11 +115,11 @@ ACTStatus HostGuestLogManager::SetContext(const std::string& name, int64_t value
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus HostGuestLogManager::SetContext(const std::string& name, bool value, PiiKind piiKind) {
|
||||
EVTStatus HostGuestLogManager::SetContext(const std::string& name, bool value, PiiKind piiKind) {
|
||||
ARIASDK_LOG_INFO("SetContext");
|
||||
EventProperty prop(value, piiKind);
|
||||
m_context->setCustomField(name, prop);
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -128,11 +128,11 @@ ACTStatus HostGuestLogManager::SetContext(const std::string& name, bool value, P
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus HostGuestLogManager::SetContext(const std::string& name, time_ticks_t value, PiiKind piiKind) {
|
||||
EVTStatus HostGuestLogManager::SetContext(const std::string& name, time_ticks_t value, PiiKind piiKind) {
|
||||
ARIASDK_LOG_INFO("SetContext");
|
||||
EventProperty prop(value, piiKind);
|
||||
m_context->setCustomField(name, prop);
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -141,11 +141,11 @@ ACTStatus HostGuestLogManager::SetContext(const std::string& name, time_ticks_t
|
|||
/// <param name="name"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="piiKind"></param>
|
||||
ACTStatus HostGuestLogManager::SetContext(const std::string& name, GUID_t value, PiiKind piiKind) {
|
||||
EVTStatus HostGuestLogManager::SetContext(const std::string& name, GUID_t value, PiiKind piiKind) {
|
||||
ARIASDK_LOG_INFO("SetContext");
|
||||
EventProperty prop(value, piiKind);
|
||||
m_context->setCustomField(name, prop);
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -165,4 +165,4 @@ ILogger* HostGuestLogManager::GetLogger(std::string const& tenantToken)
|
|||
return logger;
|
||||
}
|
||||
}
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
#include <mutex>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This class is used to manage the Telemetry logging system
|
||||
/// This class is used to manage the Events logging system
|
||||
/// </summary>
|
||||
class HostGuestLogManager : public ILogManager
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ class HostGuestLogManager : public ILogManager
|
|||
/// <param name="name">Name of the context property</param>
|
||||
/// <param name="value">String value of the context property</param>
|
||||
/// <param name='piiKind'>PIIKind of the context with PiiKind_None as the default</param>
|
||||
virtual ACTStatus SetContext(std::string const& name, std::string const& value, PiiKind piiKind = PiiKind_None);
|
||||
virtual EVTStatus SetContext(std::string const& name, std::string const& value, PiiKind piiKind = PiiKind_None);
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the custom context for the telemetry logging system.
|
||||
|
@ -60,21 +60,21 @@ class HostGuestLogManager : public ILogManager
|
|||
/// <param name="name">Name of the context property</param>
|
||||
/// <param name="value">Value of the context property</param>
|
||||
/// <param name='piiKind'>PIIKind of the context with PiiKind_None as the default</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, const char *value, PiiKind piiKind = PiiKind_None) { const std::string val(value); return SetContext(name, val, piiKind); };
|
||||
virtual EVTStatus SetContext(const std::string& name, const char *value, PiiKind piiKind = PiiKind_None) { const std::string val(value); return SetContext(name, val, piiKind); };
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">Double value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, double value, PiiKind piiKind = PiiKind_None) ;
|
||||
virtual EVTStatus SetContext(const std::string& name, double value, PiiKind piiKind = PiiKind_None) ;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">64-bit Integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, int64_t value, PiiKind piiKind = PiiKind_None);;
|
||||
virtual EVTStatus SetContext(const std::string& name, int64_t value, PiiKind piiKind = PiiKind_None);;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.<br>
|
||||
|
@ -82,7 +82,7 @@ class HostGuestLogManager : public ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">8-bit Integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, int8_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
virtual EVTStatus SetContext(const std::string& name, int8_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.<br>
|
||||
|
@ -90,7 +90,7 @@ class HostGuestLogManager : public ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">16-bit Integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, int16_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
virtual EVTStatus SetContext(const std::string& name, int16_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.<br>
|
||||
|
@ -98,7 +98,7 @@ class HostGuestLogManager : public ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">32-bit Integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, int32_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
virtual EVTStatus SetContext(const std::string& name, int32_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.<br>
|
||||
|
@ -106,7 +106,7 @@ class HostGuestLogManager : public ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">8-bit unsigned integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, uint8_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
virtual EVTStatus SetContext(const std::string& name, uint8_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.<br>
|
||||
|
@ -114,7 +114,7 @@ class HostGuestLogManager : public ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">16-bit unsigned integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, uint16_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
virtual EVTStatus SetContext(const std::string& name, uint16_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.<br>
|
||||
|
@ -122,7 +122,7 @@ class HostGuestLogManager : public ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">32-bit unsigned integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, uint32_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
virtual EVTStatus SetContext(const std::string& name, uint32_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.<br>
|
||||
|
@ -130,28 +130,28 @@ class HostGuestLogManager : public ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">64-bit unsigned integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, uint64_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
virtual EVTStatus SetContext(const std::string& name, uint64_t value, PiiKind piiKind = PiiKind_None) { return SetContext(name, (int64_t)value, piiKind); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">Boolean value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, bool value, PiiKind piiKind = PiiKind_None);
|
||||
virtual EVTStatus SetContext(const std::string& name, bool value, PiiKind piiKind = PiiKind_None);
|
||||
|
||||
/// <summary>
|
||||
/// Adds or s a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">.NET time ticks</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, time_ticks_t value, PiiKind piiKind = PiiKind_None);
|
||||
virtual EVTStatus SetContext(const std::string& name, time_ticks_t value, PiiKind piiKind = PiiKind_None);
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">GUID</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, GUID_t value, PiiKind piiKind = PiiKind_None);
|
||||
virtual EVTStatus SetContext(const std::string& name, GUID_t value, PiiKind piiKind = PiiKind_None);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the ILogger interface of a Logger instance through which to log telemetry events.
|
||||
|
@ -180,5 +180,5 @@ class HostGuestLogManager : public ILogManager
|
|||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
#endif //ARIA_HOSTGUEST_LOGMANAGER_HPP
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
#include <string>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This class is used to manage the Telemetry logging system
|
||||
/// This class is used to manage the Events logging system
|
||||
/// </summary>
|
||||
class ILogManagerInternal
|
||||
{
|
||||
|
@ -230,4 +230,4 @@ class ILogManagerInternal
|
|||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -9,27 +9,27 @@
|
|||
|
||||
namespace ARIASDK_NS_BEGIN {
|
||||
|
||||
ACTStatus LogConfiguration::SetMinimumTraceLevel(ACTTraceLevel minimumTraceLevel)
|
||||
EVTStatus LogConfiguration::SetMinimumTraceLevel(ACTTraceLevel minimumTraceLevel)
|
||||
{
|
||||
m_minimumTraceLevel = minimumTraceLevel;
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
ACTTraceLevel LogConfiguration::GetMinimumTraceLevel() const
|
||||
{
|
||||
return m_minimumTraceLevel;
|
||||
}
|
||||
ACTStatus LogConfiguration::SetSdkModeType(SdkModeTypes sdkmode)
|
||||
EVTStatus LogConfiguration::SetSdkModeType(SdkModeTypes sdkmode)
|
||||
{
|
||||
m_sdkmode = sdkmode;
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
SdkModeTypes LogConfiguration::GetSdkModeType() const
|
||||
{
|
||||
return m_sdkmode;
|
||||
}
|
||||
|
||||
ACTStatus LogConfiguration::SetProperty(char const* key, char const* value)
|
||||
EVTStatus LogConfiguration::SetProperty(char const* key, char const* value)
|
||||
{
|
||||
if (nullptr != key && nullptr != value)
|
||||
{
|
||||
|
@ -38,12 +38,12 @@ namespace ARIASDK_NS_BEGIN {
|
|||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
strProps[keyString] = value;
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
}
|
||||
return ACTStatus::ACTStatus_Fail;
|
||||
return EVTStatus::EVTStatus_Fail;
|
||||
}
|
||||
ACTStatus LogConfiguration::SetIntProperty(char const* key, unsigned int value)
|
||||
EVTStatus LogConfiguration::SetIntProperty(char const* key, unsigned int value)
|
||||
{
|
||||
if (nullptr != key)
|
||||
{
|
||||
|
@ -52,12 +52,12 @@ namespace ARIASDK_NS_BEGIN {
|
|||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
intProps[keyString] = value;
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
}
|
||||
return ACTStatus::ACTStatus_Fail;
|
||||
return EVTStatus::EVTStatus_Fail;
|
||||
}
|
||||
ACTStatus LogConfiguration::SetBoolProperty(char const* key, bool value)
|
||||
EVTStatus LogConfiguration::SetBoolProperty(char const* key, bool value)
|
||||
{
|
||||
if (nullptr != key)
|
||||
{
|
||||
|
@ -66,66 +66,66 @@ namespace ARIASDK_NS_BEGIN {
|
|||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
boolProps[keyString] = value;
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
}
|
||||
return ACTStatus::ACTStatus_Fail;
|
||||
return EVTStatus::EVTStatus_Fail;
|
||||
}
|
||||
ACTStatus LogConfiguration::SetPointerProperty(char const* key, void* value)
|
||||
EVTStatus LogConfiguration::SetPointerProperty(char const* key, void* value)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(key);
|
||||
UNREFERENCED_PARAMETER(value);
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
|
||||
char const* LogConfiguration::GetProperty(char const* key, ACTStatus& error) const
|
||||
char const* LogConfiguration::GetProperty(char const* key, EVTStatus& error) const
|
||||
{
|
||||
if (nullptr != key)
|
||||
{
|
||||
std::string keyString(key);
|
||||
if (!keyString.empty() && strProps.find(keyString) != strProps.end())
|
||||
{
|
||||
error = ACTStatus::ACTStatus_OK;
|
||||
error = EVTStatus::EVTStatus_OK;
|
||||
return strProps.at(keyString).c_str();
|
||||
}
|
||||
}
|
||||
error = ACTStatus::ACTStatus_Fail;
|
||||
error = EVTStatus::EVTStatus_Fail;
|
||||
return "";
|
||||
}
|
||||
|
||||
uint32_t LogConfiguration::GetIntProperty(char const* key, ACTStatus& error) const
|
||||
uint32_t LogConfiguration::GetIntProperty(char const* key, EVTStatus& error) const
|
||||
{
|
||||
if (nullptr != key)
|
||||
{
|
||||
std::string keyString(key);
|
||||
if (!keyString.empty() && intProps.find(keyString) != intProps.end())
|
||||
{
|
||||
error = ACTStatus::ACTStatus_OK;
|
||||
error = EVTStatus::EVTStatus_OK;
|
||||
return intProps.at(keyString);
|
||||
}
|
||||
}
|
||||
error = ACTStatus::ACTStatus_Fail;
|
||||
error = EVTStatus::EVTStatus_Fail;
|
||||
return 0;
|
||||
}
|
||||
bool LogConfiguration::GetBoolProperty(char const* key, ACTStatus& error) const
|
||||
bool LogConfiguration::GetBoolProperty(char const* key, EVTStatus& error) const
|
||||
{
|
||||
if (nullptr != key)
|
||||
{
|
||||
std::string keyString(key);
|
||||
if (!keyString.empty() && boolProps.find(keyString) != boolProps.end())
|
||||
{
|
||||
error = ACTStatus::ACTStatus_OK;
|
||||
error = EVTStatus::EVTStatus_OK;
|
||||
return boolProps.at(keyString);
|
||||
}
|
||||
}
|
||||
error = ACTStatus::ACTStatus_Fail;
|
||||
error = EVTStatus::EVTStatus_Fail;
|
||||
return false;
|
||||
}
|
||||
|
||||
void* LogConfiguration::GetPointerProperty(char const* key, ACTStatus& error) const
|
||||
void* LogConfiguration::GetPointerProperty(char const* key, EVTStatus& error) const
|
||||
{
|
||||
UNREFERENCED_PARAMETER(key);
|
||||
error = ACTStatus::ACTStatus_Fail;
|
||||
error = EVTStatus::EVTStatus_Fail;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -160,9 +160,9 @@ namespace ARIASDK_NS_BEGIN {
|
|||
strProps.insert(src.strProps.begin(), src.strProps.end());
|
||||
intProps.insert(src.intProps.begin(), src.intProps.end());
|
||||
boolProps.insert(src.boolProps.begin(), src.boolProps.end());
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
std::string url = src.GetProperty(CFG_STR_COLLECTOR_URL, error);
|
||||
if (url.empty() || error == ACTStatus::ACTStatus_Fail)
|
||||
if (url.empty() || error == EVTStatus::EVTStatus_Fail)
|
||||
{
|
||||
SetProperty(CFG_STR_COLLECTOR_URL, TC_DEFAULT_EVENT_COLLECTOR_URL_PROD);
|
||||
}
|
||||
|
@ -190,9 +190,9 @@ namespace ARIASDK_NS_BEGIN {
|
|||
strProps.insert(src.strProps.begin(), src.strProps.end());
|
||||
intProps.insert(src.intProps.begin(), src.intProps.end());
|
||||
boolProps.insert(src.boolProps.begin(), src.boolProps.end());
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
std::string url = src.GetProperty(CFG_STR_COLLECTOR_URL, error);
|
||||
if (url.empty() || error == ACTStatus::ACTStatus_Fail)
|
||||
if (url.empty() || error == EVTStatus::EVTStatus_Fail)
|
||||
{
|
||||
SetProperty(CFG_STR_COLLECTOR_URL, TC_DEFAULT_EVENT_COLLECTOR_URL_PROD);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
|
||||
class LogConfiguration : public ILogConfiguration
|
||||
{
|
||||
|
@ -24,18 +24,18 @@ namespace Microsoft {
|
|||
|
||||
public:
|
||||
|
||||
virtual ACTStatus SetMinimumTraceLevel(ACTTraceLevel minimumTraceLevel) override;
|
||||
virtual EVTStatus SetMinimumTraceLevel(ACTTraceLevel minimumTraceLevel) override;
|
||||
virtual ACTTraceLevel GetMinimumTraceLevel() const override;
|
||||
virtual ACTStatus SetSdkModeType(SdkModeTypes sdkmode) override;
|
||||
virtual EVTStatus SetSdkModeType(SdkModeTypes sdkmode) override;
|
||||
virtual SdkModeTypes GetSdkModeType() const override;
|
||||
virtual ACTStatus SetProperty(char const* key, char const* value) override;
|
||||
virtual ACTStatus SetIntProperty(char const* key, uint32_t value) override;
|
||||
virtual ACTStatus SetBoolProperty(char const* key, bool value) override;
|
||||
virtual ACTStatus SetPointerProperty(char const* key, void* value) override;
|
||||
virtual char const* GetProperty(char const* key, ACTStatus& error) const override;
|
||||
virtual uint32_t GetIntProperty(char const* key, ACTStatus& error) const override;
|
||||
virtual bool GetBoolProperty(char const* key, ACTStatus& error) const override;
|
||||
virtual void* GetPointerProperty(char const* key, ACTStatus& error) const override;
|
||||
virtual EVTStatus SetProperty(char const* key, char const* value) override;
|
||||
virtual EVTStatus SetIntProperty(char const* key, uint32_t value) override;
|
||||
virtual EVTStatus SetBoolProperty(char const* key, bool value) override;
|
||||
virtual EVTStatus SetPointerProperty(char const* key, void* value) override;
|
||||
virtual char const* GetProperty(char const* key, EVTStatus& error) const override;
|
||||
virtual uint32_t GetIntProperty(char const* key, EVTStatus& error) const override;
|
||||
virtual bool GetBoolProperty(char const* key, EVTStatus& error) const override;
|
||||
virtual void* GetPointerProperty(char const* key, EVTStatus& error) const override;
|
||||
|
||||
///<summary>LogConfiguration constructor</summary>
|
||||
LogConfiguration();
|
||||
|
@ -57,5 +57,5 @@ namespace Microsoft {
|
|||
};
|
||||
}
|
||||
}
|
||||
} // namespace Microsoft::Applications::Telemetry
|
||||
} // namespace Microsoft::Applications::Events
|
||||
#endif //MYAPPLICATION_EVENTPROPERTIES_H
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
namespace ARIASDK_NS_BEGIN {
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(LogController, "AriaSDK.LogController", "Aria telemetry client - LogController class");
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(LogController, "EventsSDK.LogController", "Events telemetry client - LogController class");
|
||||
|
||||
LogController::LogController()
|
||||
{
|
||||
|
@ -18,24 +18,24 @@ LogController::~LogController()
|
|||
ARIASDK_LOG_INFO("destructor");
|
||||
}
|
||||
|
||||
ACTStatus LogController::Flush()
|
||||
EVTStatus LogController::Flush()
|
||||
{
|
||||
ARIASDK_LOG_ERROR("Flush() is not implemented");
|
||||
return CommonLogManagerInternal::Flush();
|
||||
}
|
||||
|
||||
ACTStatus LogController::UploadNow()
|
||||
EVTStatus LogController::UploadNow()
|
||||
{
|
||||
return CommonLogManagerInternal::UploadNow();
|
||||
}
|
||||
|
||||
ACTStatus LogController::PauseTransmission()
|
||||
EVTStatus LogController::PauseTransmission()
|
||||
{
|
||||
ARIASDK_LOG_INFO("Pausing transmission, cancelling any outstanding uploads...");
|
||||
return CommonLogManagerInternal::PauseTransmission();
|
||||
}
|
||||
|
||||
ACTStatus LogController::ResumeTransmission()
|
||||
EVTStatus LogController::ResumeTransmission()
|
||||
{
|
||||
ARIASDK_LOG_INFO("Resuming transmission...");
|
||||
return CommonLogManagerInternal::ResumeTransmission();
|
||||
|
@ -43,7 +43,7 @@ ACTStatus LogController::ResumeTransmission()
|
|||
|
||||
/// <summary>Sets the transmit profile by enum</summary>
|
||||
/// <param name="profile">Profile enum</param>
|
||||
ACTStatus LogController::SetTransmitProfile(TransmitProfile profile)
|
||||
EVTStatus LogController::SetTransmitProfile(TransmitProfile profile)
|
||||
{
|
||||
return CommonLogManagerInternal::SetTransmitProfile(profile);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ ACTStatus LogController::SetTransmitProfile(TransmitProfile profile)
|
|||
/// Select one of several predefined transmission profiles.
|
||||
/// </summary>
|
||||
/// <param name="profile"></param>
|
||||
ACTStatus LogController::SetTransmitProfile(const std::string& profile)
|
||||
EVTStatus LogController::SetTransmitProfile(const std::string& profile)
|
||||
{
|
||||
ARIASDK_LOG_INFO("SetTransmitProfile: profile=%s", profile.c_str());
|
||||
return CommonLogManagerInternal::SetTransmitProfile(profile);
|
||||
|
@ -63,7 +63,7 @@ ACTStatus LogController::SetTransmitProfile(const std::string& profile)
|
|||
/// </summary>
|
||||
/// <param name="profiles_json">JSON config (see example above)</param>
|
||||
/// <returns>true on successful profiles load, false if config is invalid</returns>
|
||||
ACTStatus LogController::LoadTransmitProfiles(const std::string& profiles_json)
|
||||
EVTStatus LogController::LoadTransmitProfiles(const std::string& profiles_json)
|
||||
{
|
||||
ARIASDK_LOG_INFO("LoadTransmitProfiles");
|
||||
return CommonLogManagerInternal::LoadTransmitProfiles(profiles_json);
|
||||
|
@ -72,7 +72,7 @@ ACTStatus LogController::LoadTransmitProfiles(const std::string& profiles_json)
|
|||
/// <summary>
|
||||
/// Reset transmission profiles to default settings
|
||||
/// </summary>
|
||||
ACTStatus LogController::ResetTransmitProfiles()
|
||||
EVTStatus LogController::ResetTransmitProfiles()
|
||||
{
|
||||
ARIASDK_LOG_INFO("ResetTransmitProfiles");
|
||||
return CommonLogManagerInternal::ResetTransmitProfiles();
|
||||
|
@ -99,4 +99,4 @@ void LogController::RemoveEventListener(DebugEventType type, DebugEventListener
|
|||
CommonLogManagerInternal::RemoveEventListener(type, listener);
|
||||
}
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
#include <mutex>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This class is used to manage the Telemetry logging system
|
||||
/// This class is used to manage the Events logging system
|
||||
/// </summary>
|
||||
class LogController : public ILogController
|
||||
{
|
||||
|
@ -32,23 +32,23 @@ class LogController : public ILogController
|
|||
/// and might flush the global file buffers, i.e. all buffered filesystem data, to disk, which could be
|
||||
/// time consuming.
|
||||
/// </summary>
|
||||
virtual ACTStatus Flush();
|
||||
virtual EVTStatus Flush();
|
||||
|
||||
/// <summary>
|
||||
/// Try to send any pending telemetry events in memory or on disk.
|
||||
/// </summary>
|
||||
virtual ACTStatus UploadNow();
|
||||
virtual EVTStatus UploadNow();
|
||||
|
||||
/// <summary>
|
||||
/// Pauses the transmission of events to data collector.
|
||||
/// While pasued events will continue to be queued up on client side in cache (either in memory or on disk file).
|
||||
/// </summary>
|
||||
virtual ACTStatus PauseTransmission();
|
||||
virtual EVTStatus PauseTransmission();
|
||||
|
||||
/// <summary>
|
||||
/// Resumes the transmission of events to data collector.
|
||||
/// </summary>
|
||||
virtual ACTStatus ResumeTransmission();
|
||||
virtual EVTStatus ResumeTransmission();
|
||||
|
||||
/// <summary>
|
||||
/// Sets transmit profile for event transmission to one of the built-in profiles.
|
||||
|
@ -57,7 +57,7 @@ class LogController : public ILogController
|
|||
/// </summary>
|
||||
/// <param name="profile">Transmit profile</param>
|
||||
/// <returns>This function doesn't return any value because it always succeeds.</returns>
|
||||
virtual ACTStatus SetTransmitProfile(TransmitProfile profile);
|
||||
virtual EVTStatus SetTransmitProfile(TransmitProfile profile);
|
||||
|
||||
/// <summary>
|
||||
/// Sets transmit profile for event transmission.
|
||||
|
@ -66,19 +66,19 @@ class LogController : public ILogController
|
|||
/// </summary>
|
||||
/// <param name="profile">Transmit profile</param>
|
||||
/// <returns>true if profile is successfully applied, false otherwise</returns>
|
||||
virtual ACTStatus SetTransmitProfile(const std::string& profile) ;
|
||||
virtual EVTStatus SetTransmitProfile(const std::string& profile) ;
|
||||
|
||||
/// <summary>
|
||||
/// Load transmit profiles from JSON config
|
||||
/// </summary>
|
||||
/// <param name="profiles_json">JSON config (see example above)</param>
|
||||
/// <returns>true on successful profiles load, false if config is invalid</returns>
|
||||
virtual ACTStatus LoadTransmitProfiles(const std::string& profiles_json) ;
|
||||
virtual EVTStatus LoadTransmitProfiles(const std::string& profiles_json) ;
|
||||
|
||||
/// <summary>
|
||||
/// Reset transmission profiles to default settings
|
||||
/// </summary>
|
||||
virtual ACTStatus ResetTransmitProfiles();
|
||||
virtual EVTStatus ResetTransmitProfiles();
|
||||
|
||||
/// <summary>
|
||||
/// Reset transmission profiles to default settings
|
||||
|
@ -101,5 +101,5 @@ class LogController : public ILogController
|
|||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
#endif //ARIA_LOG_CONTROLLER_HPP
|
|
@ -13,7 +13,7 @@ using namespace std;
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
|
||||
std::mutex* our_lockP = new std::mutex();
|
||||
ILogManager* our_pLogManagerSingletonInstanceP = nullptr;
|
||||
|
@ -33,7 +33,7 @@ namespace Microsoft {
|
|||
|
||||
if (nullptr == our_pLogManagerSingletonInstanceP)
|
||||
{
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
std::string cacheFilePath = our_LogConfigurationP->GetProperty(CFG_STR_CACHE_FILE_PATH, error);
|
||||
if (cacheFilePath.empty())
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ ILogManagerInternal* ILogManagerInternal::Create(LogConfiguration& configuration
|
|||
//---
|
||||
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(LogManagerImpl, "AriaSDK.LogManager", "Aria telemetry client - LogManager class");
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(LogManagerImpl, "EventsSDK.LogManager", "Events telemetry client - LogManager class");
|
||||
|
||||
LogManagerImpl::LogManagerImpl(LogConfiguration configuration, IRuntimeConfig* runtimeConfig)
|
||||
: m_httpClient(nullptr),//(IHttpClient*)configuration.GetPointerProperty("httpClient")),
|
||||
|
@ -130,7 +130,7 @@ LogManagerImpl::LogManagerImpl(LogConfiguration configuration, IRuntimeConfig* r
|
|||
m_offlineStorage.reset(new OfflineStorageHandler(m_logConfiguration, *m_runtimeConfig));
|
||||
|
||||
m_system = new TelemetrySystem(m_logConfiguration, *m_runtimeConfig, *m_offlineStorage, *m_httpClient, *m_context, m_bandwidthController);
|
||||
ARIASDK_LOG_DETAIL("Telemetry system created, starting up...");
|
||||
ARIASDK_LOG_DETAIL("Events system created, starting up...");
|
||||
if (m_system)
|
||||
{
|
||||
m_system->start();
|
||||
|
@ -162,7 +162,7 @@ void LogManagerImpl::FlushAndTeardown()
|
|||
if (m_system)
|
||||
{
|
||||
m_system->stop();
|
||||
ARIASDK_LOG_DETAIL("Telemetry system stopped");
|
||||
ARIASDK_LOG_DETAIL("Events system stopped");
|
||||
m_system = nullptr;
|
||||
}
|
||||
|
||||
|
@ -379,4 +379,4 @@ void LogManagerImpl::addIncomingEvent(IncomingEventContextPtr const& event)
|
|||
}
|
||||
}
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -12,7 +12,7 @@ using namespace std;
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
struct hostLogManagerHolder
|
||||
{
|
||||
int refcount = 0;
|
||||
|
@ -34,19 +34,19 @@ namespace Microsoft {
|
|||
ILogManager* LogManagerProvider::CreateLogManager(char const* apiKey,
|
||||
bool wantController,
|
||||
ILogConfiguration& logConfiguration,
|
||||
ACTStatus& status,
|
||||
EVTStatus& status,
|
||||
uint32_t targetVersion)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("Initialize[2]: apiKey=%s, configuration=0x%X", apiKey, logConfiguration);
|
||||
|
||||
if (!apiKey)
|
||||
{
|
||||
status = ACTStatus::ACTStatus_NotSupported;
|
||||
status = EVTStatus::EVTStatus_NotSupported;
|
||||
return nullptr;
|
||||
}
|
||||
if (CurrentTargetVersion != targetVersion)
|
||||
{
|
||||
status = ACTStatus::ACTStatus_NotSupported;
|
||||
status = EVTStatus::EVTStatus_NotSupported;
|
||||
}
|
||||
|
||||
LogConfiguration* config = dynamic_cast<LogConfiguration*>(&logConfiguration);
|
||||
|
@ -64,21 +64,21 @@ namespace Microsoft {
|
|||
our_LogManagers[apiKey].refcount++;
|
||||
}
|
||||
}
|
||||
status = ACTStatus::ACTStatus_OK;
|
||||
status = EVTStatus::EVTStatus_OK;
|
||||
return our_LogManagers[apiKey].hostLogManager;
|
||||
}
|
||||
|
||||
ILogManager* LogManagerProvider::CreateLogManager(char const* apiKey, bool wantController, ACTStatus& status, uint32_t targetVersion)
|
||||
ILogManager* LogManagerProvider::CreateLogManager(char const* apiKey, bool wantController, EVTStatus& status, uint32_t targetVersion)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("Initialize[1]: apiKey=%s", apiKey);
|
||||
if (!apiKey)
|
||||
{
|
||||
status = ACTStatus::ACTStatus_NotSupported;
|
||||
status = EVTStatus::EVTStatus_NotSupported;
|
||||
return nullptr;
|
||||
}
|
||||
if (CurrentTargetVersion != targetVersion)
|
||||
{
|
||||
status = ACTStatus::ACTStatus_NotSupported;
|
||||
status = EVTStatus::EVTStatus_NotSupported;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -97,27 +97,27 @@ namespace Microsoft {
|
|||
}
|
||||
}
|
||||
|
||||
status = ACTStatus::ACTStatus_OK;
|
||||
status = EVTStatus::EVTStatus_OK;
|
||||
return our_LogManagers[apiKey].hostLogManager;
|
||||
}
|
||||
|
||||
ILogManager* LogManagerProvider::CreateLogManager(char const* apiKey, ACTStatus& status, uint32_t targetVersion)
|
||||
ILogManager* LogManagerProvider::CreateLogManager(char const* apiKey, EVTStatus& status, uint32_t targetVersion)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("Initialize[1]: apiKey=%s", apiKey);
|
||||
return LogManagerProvider::CreateLogManager(apiKey, false, status, targetVersion);
|
||||
}
|
||||
|
||||
ILogManager* LogManagerProvider::GetLogManager(char const* apiKey, ACTStatus& status, uint32_t targetVersion)
|
||||
ILogManager* LogManagerProvider::GetLogManager(char const* apiKey, EVTStatus& status, uint32_t targetVersion)
|
||||
{
|
||||
ARIASDK_LOG_DETAIL("Initialize[1]: apiKey=%s", apiKey);
|
||||
if (!apiKey)
|
||||
{
|
||||
status = ACTStatus::ACTStatus_NotSupported;
|
||||
status = EVTStatus::EVTStatus_NotSupported;
|
||||
return nullptr;
|
||||
}
|
||||
if (CurrentTargetVersion != targetVersion)
|
||||
{
|
||||
status = ACTStatus::ACTStatus_NotSupported;
|
||||
status = EVTStatus::EVTStatus_NotSupported;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -125,20 +125,20 @@ namespace Microsoft {
|
|||
std::lock_guard<std::mutex> lock(*our_LogManagerProviderlockP);
|
||||
if (our_LogManagers.find(apiKey) != our_LogManagers.end())
|
||||
{
|
||||
status = ACTStatus::ACTStatus_OK;
|
||||
status = EVTStatus::EVTStatus_OK;
|
||||
return our_LogManagers[apiKey].hostLogManager;
|
||||
}
|
||||
}
|
||||
status = ACTStatus::ACTStatus_Fail;
|
||||
status = EVTStatus::EVTStatus_Fail;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ACTStatus LogManagerProvider::DestroyLogManager(char const* apiKey)
|
||||
EVTStatus LogManagerProvider::DestroyLogManager(char const* apiKey)
|
||||
{
|
||||
if (!apiKey)
|
||||
{
|
||||
return ACTStatus::ACTStatus_NotSupported;
|
||||
return EVTStatus::EVTStatus_NotSupported;
|
||||
}
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(*our_LogManagerProviderlockP);
|
||||
|
@ -152,7 +152,7 @@ namespace Microsoft {
|
|||
}
|
||||
}
|
||||
}
|
||||
return ACTStatus::ACTStatus_OK;
|
||||
return EVTStatus::EVTStatus_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <algorithm>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
// extern void SendAsJSON(const EventProperties& properties, const std::string& token);
|
||||
|
@ -122,7 +122,7 @@ void Logger::LogEvent(EventProperties const& properties)
|
|||
CommonLogManagerInternal::DispatchEvent(DebugEventType::EVT_LOG_EVENT);
|
||||
}
|
||||
|
||||
bool Logger::applyCommonDecorators(::AriaProtocol::CsEvent& record, EventProperties const& properties, ::Microsoft::Applications::Telemetry::EventLatency& latency)
|
||||
bool Logger::applyCommonDecorators(::AriaProtocol::CsEvent& record, EventProperties const& properties, ::Microsoft::Applications::Events ::EventLatency& latency)
|
||||
{
|
||||
record.name = properties.GetName();
|
||||
if (record.name.empty())
|
||||
|
@ -142,8 +142,8 @@ bool Logger::applyCommonDecorators(::AriaProtocol::CsEvent& record, EventPropert
|
|||
}
|
||||
|
||||
void Logger::submit(::AriaProtocol::CsEvent& record,
|
||||
::Microsoft::Applications::Telemetry::EventLatency latency,
|
||||
::Microsoft::Applications::Telemetry::EventPersistence persistence,
|
||||
::Microsoft::Applications::Events ::EventLatency latency,
|
||||
::Microsoft::Applications::Events ::EventPersistence persistence,
|
||||
std::uint64_t const& policyBitFlags)
|
||||
{
|
||||
if (latency == EventLatency_Off)
|
||||
|
@ -166,4 +166,4 @@ void Logger::submit(::AriaProtocol::CsEvent& record,
|
|||
}
|
||||
}
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -45,10 +45,10 @@ class ARIASDK_LIBABI Logger : public ILogger
|
|||
virtual void LogEvent(EventProperties const& properties) override;
|
||||
|
||||
protected:
|
||||
bool applyCommonDecorators(::AriaProtocol::CsEvent& record, EventProperties const& properties, ::Microsoft::Applications::Telemetry::EventLatency& latency);
|
||||
bool applyCommonDecorators(::AriaProtocol::CsEvent& record, EventProperties const& properties, ::Microsoft::Applications::Events ::EventLatency& latency);
|
||||
virtual void submit(::AriaProtocol::CsEvent& record,
|
||||
::Microsoft::Applications::Telemetry::EventLatency latency,
|
||||
::Microsoft::Applications::Telemetry::EventPersistence persistence,
|
||||
::Microsoft::Applications::Events ::EventLatency latency,
|
||||
::Microsoft::Applications::Events ::EventPersistence persistence,
|
||||
std::uint64_t const& policyBitFlags);
|
||||
void SetContext(const std::string& name, EventProperty prop);
|
||||
// protected:
|
||||
|
|
|
@ -15,7 +15,7 @@ RuntimeConfig_Default::~RuntimeConfig_Default()
|
|||
|
||||
void RuntimeConfig_Default::initialize(LogConfiguration& configuration)
|
||||
{
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
std::string url = configuration.GetProperty(CFG_STR_COLLECTOR_URL, error);
|
||||
if (!url.empty()) {
|
||||
m_collectorUrl = url;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <vector>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry { namespace ControlPlane
|
||||
namespace Microsoft { namespace Applications { namespace Events { namespace ControlPlane
|
||||
// *INDENT-ON*
|
||||
{
|
||||
template <class TObserverType, class TNotifyDataType>
|
||||
|
@ -92,4 +92,4 @@ namespace Microsoft { namespace Applications { namespace Telemetry { namespace C
|
|||
const GUID_t & m_ariaTenantId;
|
||||
};
|
||||
|
||||
}}}} // namespace Microsoft::Applications::Telemetry::ControlPlane
|
||||
}}}} // namespace Microsoft::Applications::Events ::ControlPlane
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "ConcurrentObservable.hpp"
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry { namespace ControlPlane
|
||||
namespace Microsoft { namespace Applications { namespace Events { namespace ControlPlane
|
||||
// *INDENT-ON*
|
||||
{
|
||||
struct ControlPlaneChangeData : public ChangeDataTemplate<IControlPlane>
|
||||
|
@ -23,4 +23,4 @@ namespace Microsoft { namespace Applications { namespace Telemetry { namespace C
|
|||
}
|
||||
};
|
||||
|
||||
}}}} // namespace Microsoft::Applications::Telemetry::ControlPlane
|
||||
}}}} // namespace Microsoft::Applications::Events ::ControlPlane
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "DiskLocalStorage.hpp"
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry { namespace ControlPlane
|
||||
namespace Microsoft { namespace Applications { namespace Events { namespace ControlPlane
|
||||
// *INDENT-ON*
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -91,4 +91,4 @@ namespace Microsoft { namespace Applications { namespace Telemetry { namespace C
|
|||
m_observable.Unregister(handler);
|
||||
}
|
||||
|
||||
}}}} // namespace Microsoft::Applications::Telemetry::ControlPlane
|
||||
}}}} // namespace Microsoft::Applications::Events ::ControlPlane
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <memory>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry { namespace ControlPlane
|
||||
namespace Microsoft { namespace Applications { namespace Events { namespace ControlPlane
|
||||
// *INDENT-ON*
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -61,4 +61,4 @@ namespace Microsoft { namespace Applications { namespace Telemetry { namespace C
|
|||
virtual void UnregisterChangeEventHandler(ILocalStorageChangeEventHandler * handler) override;
|
||||
};
|
||||
|
||||
}}}} // namespace Microsoft::Applications::Telemetry::ControlPlane
|
||||
}}}} // namespace Microsoft::Applications::Events ::ControlPlane
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "IControlPlane.hpp"
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry { namespace ControlPlane
|
||||
namespace Microsoft { namespace Applications { namespace Events { namespace ControlPlane
|
||||
// *INDENT-ON*
|
||||
{
|
||||
// Forward reference is needed for change handler declaration
|
||||
|
@ -94,4 +94,4 @@ namespace Microsoft { namespace Applications { namespace Telemetry { namespace C
|
|||
virtual TenantDataPtr DeserializeTenantData(const std::string& string) const = 0;
|
||||
};
|
||||
|
||||
}}}} // namespace Microsoft::Applications::Telemetry::ControlPlane
|
||||
}}}} // namespace Microsoft::Applications::Events ::ControlPlane
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "ConcurrentObservable.hpp"
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry { namespace ControlPlane
|
||||
namespace Microsoft { namespace Applications { namespace Events { namespace ControlPlane
|
||||
// *INDENT-ON*
|
||||
{
|
||||
struct LocalStorageReaderChangeData : public ChangeDataTemplate<ILocalStorageReader>
|
||||
|
@ -23,4 +23,4 @@ namespace Microsoft { namespace Applications { namespace Telemetry { namespace C
|
|||
}
|
||||
};
|
||||
|
||||
}}}} // namespace Microsoft::Applications::Telemetry::ControlPlane
|
||||
}}}} // namespace Microsoft::Applications::Events ::ControlPlane
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
#include "SingleControlPlane.hpp"
|
||||
#include "utils/Utils.hpp"
|
||||
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry { namespace ControlPlane
|
||||
namespace Microsoft { namespace Applications { namespace Events { namespace ControlPlane
|
||||
// *INDENT-ON*
|
||||
{
|
||||
SingleControlPlane::SingleControlPlane(std::unique_ptr<ILocalStorageReader>& localStorageReader)
|
||||
|
@ -164,4 +164,4 @@ namespace Microsoft { namespace Applications { namespace Telemetry { namespace C
|
|||
return dummyTenantData;
|
||||
}
|
||||
|
||||
}}}} // namespace Microsoft::Applications::Telemetry::ControlPlane
|
||||
}}}} // namespace Microsoft::Applications::Events ::ControlPlane
|
|
@ -9,7 +9,7 @@
|
|||
#include <memory>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry { namespace ControlPlane
|
||||
namespace Microsoft { namespace Applications { namespace Events { namespace ControlPlane
|
||||
// *INDENT-ON*
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -41,4 +41,4 @@ namespace Microsoft { namespace Applications { namespace Telemetry { namespace C
|
|||
void UnregisterChangeEventHandler(IControlPlaneChangeEventHandler* handler) override;
|
||||
};
|
||||
|
||||
}}}} // namespace Microsoft::Applications::Telemetry::ControlPlane
|
||||
}}}} // namespace Microsoft::Applications::Events ::ControlPlane
|
|
@ -8,7 +8,7 @@
|
|||
using namespace nlohmann;
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry { namespace ControlPlane
|
||||
namespace Microsoft { namespace Applications { namespace Events { namespace ControlPlane
|
||||
// *INDENT-ON*
|
||||
{
|
||||
LPCSTR TenantDataSerializer::BOOL_MAP_NAME = "BoolMap";
|
||||
|
@ -100,4 +100,4 @@ namespace Microsoft { namespace Applications { namespace Telemetry { namespace C
|
|||
}
|
||||
}
|
||||
|
||||
}}}} // namespace Microsoft::Applications::Telemetry::ControlPlane
|
||||
}}}} // namespace Microsoft::Applications::Events ::ControlPlane
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "ILocalStorage.hpp"
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry { namespace ControlPlane
|
||||
namespace Microsoft { namespace Applications { namespace Events { namespace ControlPlane
|
||||
// *INDENT-ON*
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -33,4 +33,4 @@ namespace Microsoft { namespace Applications { namespace Telemetry { namespace C
|
|||
static LPCSTR STRING_MAP_NAME;
|
||||
};
|
||||
|
||||
}}}} // namespace Microsoft::Applications::Telemetry::ControlPlane
|
||||
}}}} // namespace Microsoft::Applications::Events ::ControlPlane
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
#endif
|
||||
|
||||
using namespace std;
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Telemetry::PAL;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
using namespace Microsoft::Applications::Events ::PAL;
|
||||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Experimentation {
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(ExpCommon, "AriaSDK.ExpCommonClient", "Aria experimentation client - common client class");
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(ExpCommon, "EventsSDK.ExpCommonClient", "Aria experimentation client - common client class");
|
||||
|
||||
const std::string ExpCommon::EXPClientStatus2STR[EXP_COUNT] =
|
||||
{
|
||||
|
|
|
@ -99,7 +99,7 @@ namespace Microsoft {
|
|||
std::string requestName;
|
||||
int httpstackError;
|
||||
int statusCode;
|
||||
Microsoft::Applications::Telemetry::HttpHeaders headers;
|
||||
Microsoft::Applications::Events ::HttpHeaders headers;
|
||||
std::string body;
|
||||
|
||||
Message(MessageType type)
|
||||
|
@ -148,29 +148,29 @@ namespace Microsoft {
|
|||
};
|
||||
|
||||
|
||||
class ExpRequestContext : public Microsoft::Applications::Telemetry::PAL::RefCountedImpl<ExpRequestContext>
|
||||
class ExpRequestContext : public Microsoft::Applications::Events ::PAL::RefCountedImpl<ExpRequestContext>
|
||||
{
|
||||
public:
|
||||
// Sending
|
||||
std::unique_ptr<Microsoft::Applications::Telemetry::IHttpRequest> httpRequest;
|
||||
std::unique_ptr<Microsoft::Applications::Events ::IHttpRequest> httpRequest;
|
||||
std::string httpRequestId;
|
||||
|
||||
// Receiving
|
||||
std::unique_ptr<Microsoft::Applications::Telemetry::IHttpResponse const> httpResponse;
|
||||
std::unique_ptr<Microsoft::Applications::Events ::IHttpResponse const> httpResponse;
|
||||
};
|
||||
|
||||
using ExpRequestContextPtr = Microsoft::Applications::Telemetry::PAL::RefCountedPtr<ExpRequestContext>;
|
||||
using ExpRequestContextPtr = Microsoft::Applications::Events ::PAL::RefCountedPtr<ExpRequestContext>;
|
||||
|
||||
|
||||
class ExpCommon : public Microsoft::Applications::Telemetry::PAL::RefCountedImpl<ExpCommon>,
|
||||
public Microsoft::Applications::Telemetry::IHttpResponseCallback
|
||||
class ExpCommon : public Microsoft::Applications::Events ::PAL::RefCountedImpl<ExpCommon>,
|
||||
public Microsoft::Applications::Events ::IHttpResponseCallback
|
||||
{
|
||||
public:
|
||||
ExpCommon(IExpCommonClient* client, std::string retry_Queue_Name);
|
||||
~ExpCommon();
|
||||
|
||||
// Register a logger to auto-tag events sent by the logger with EXP configuration infos like ETag
|
||||
virtual bool RegisterLogger(Microsoft::Applications::Telemetry::ILogger* pLoger, const std::string& agentName);
|
||||
virtual bool RegisterLogger(Microsoft::Applications::Events ::ILogger* pLoger, const std::string& agentName);
|
||||
|
||||
virtual bool Start(std::vector<int>& retryTimes);
|
||||
|
||||
|
@ -192,15 +192,15 @@ namespace Microsoft {
|
|||
void _HandleConfigRefetch(Message& msg, bool& isActiveConfigSwitched, bool& isActiveConfigSwitchedSaveNeeded);
|
||||
|
||||
// IHttpClientManagerCallback
|
||||
virtual void OnHttpResponse(Microsoft::Applications::Telemetry::IHttpResponse const* response) override;
|
||||
virtual void OnHttpResponse(Microsoft::Applications::Events ::IHttpResponse const* response) override;
|
||||
void SendRequestAsync(std::string const& url);
|
||||
bool CancelRequestsAsync();
|
||||
|
||||
void handleMessageTask();
|
||||
|
||||
void _UpdateLoggerWithEXPConfig(Microsoft::Applications::Telemetry::ILogger* pLogger, const std::string& agentName, const std::string etag, const std::string configIds);
|
||||
void _UpdateLoggerWithEXPConfig(Microsoft::Applications::Telemetry::ILogger* pLogger, const std::string& agentName, const std::string etag, const std::map<std::string, std::string> eventconfigIds);
|
||||
void _LogEXPConfigEvent(Microsoft::Applications::Telemetry::EventProperties& evtProperties);
|
||||
void _UpdateLoggerWithEXPConfig(Microsoft::Applications::Events ::ILogger* pLogger, const std::string& agentName, const std::string etag, const std::string configIds);
|
||||
void _UpdateLoggerWithEXPConfig(Microsoft::Applications::Events ::ILogger* pLogger, const std::string& agentName, const std::string etag, const std::map<std::string, std::string> eventconfigIds);
|
||||
void _LogEXPConfigEvent(Microsoft::Applications::Events ::EventProperties& evtProperties);
|
||||
void _ScheduleFetch(unsigned int seconds = 0);
|
||||
|
||||
|
||||
|
@ -208,7 +208,7 @@ namespace Microsoft {
|
|||
std::mutex m_lock;
|
||||
std::mutex m_smalllock;
|
||||
std::vector<std::string> m_serverUrls;
|
||||
std::map<Microsoft::Applications::Telemetry::ILogger*, std::string> m_registeredLoggers;
|
||||
std::map<Microsoft::Applications::Events ::ILogger*, std::string> m_registeredLoggers;
|
||||
std::map<std::string, std::string> m_configActiveRequestParams;
|
||||
std::map<std::string, std::string> m_configActiveHeaders;
|
||||
std::string m_configActiveUserId;
|
||||
|
@ -227,17 +227,17 @@ namespace Microsoft {
|
|||
|
||||
private:
|
||||
volatile bool m_isTimerCancelling;
|
||||
Microsoft::Applications::Telemetry::PAL::DeferredCallbackHandle m_messageProcessingTask;
|
||||
Microsoft::Applications::Events ::PAL::DeferredCallbackHandle m_messageProcessingTask;
|
||||
bool m_messageProcessingTaskScheduled;
|
||||
std::vector<int> m_retryBackoffTimes;
|
||||
unsigned int m_retrybackoffTimesIndex;
|
||||
unsigned int m_minExpireTimeInSEXP;
|
||||
IExpCommonClient* m_clientPtr;
|
||||
std::string m_retry_Queue_Name;
|
||||
std::unique_ptr<Microsoft::Applications::Telemetry::IHttpClient> m_ownHttpClient;
|
||||
std::unique_ptr<Microsoft::Applications::Telemetry::IHttpResponseCallback> m_httpCallback;
|
||||
std::unique_ptr<Microsoft::Applications::Events ::IHttpClient> m_ownHttpClient;
|
||||
std::unique_ptr<Microsoft::Applications::Events ::IHttpResponseCallback> m_httpCallback;
|
||||
|
||||
Microsoft::Applications::Telemetry::IHttpClient* m_httpClient;
|
||||
Microsoft::Applications::Events ::IHttpClient* m_httpClient;
|
||||
std::string m_httpRequestId;
|
||||
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace nlohmann;
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Telemetry::PAL;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
using namespace Microsoft::Applications::Events ::PAL;
|
||||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace Microsoft { namespace Applications { namespace Experimentation { names
|
|||
virtual bool RemoveListener(IAFDClientCallback* listener);
|
||||
|
||||
// Register a logger to auto-tag events sent by the logger with AFD configuration infos like ETag
|
||||
virtual bool RegisterLogger(Microsoft::Applications::Telemetry::ILogger* pLoger, const std::string& agentName);
|
||||
virtual bool RegisterLogger(Microsoft::Applications::Events ::ILogger* pLoger, const std::string& agentName);
|
||||
|
||||
virtual bool SetRequestParameters(const std::map<std::string, std::string>& requestParams);
|
||||
|
||||
|
@ -88,7 +88,7 @@ namespace Microsoft { namespace Applications { namespace Experimentation { names
|
|||
void _ValidateAFDClientConfiguration(const AFDClientConfiguration& config);
|
||||
void _LogEXPConfigUpdateEvent( EXPConfigUpdateResult result, EXPConfigUpdateSource source);
|
||||
void _LogEXPCleintStateChangeEvent(EXPClientStatus status);
|
||||
void _UpdateLoggerWithEXPConfig(Microsoft::Applications::Telemetry::ILogger* pLogger, std::string agentName);
|
||||
void _UpdateLoggerWithEXPConfig(Microsoft::Applications::Events ::ILogger* pLogger, std::string agentName);
|
||||
void _UpdateLoggersWithEXPConfig();
|
||||
std::int64_t _GetExpiryTimeInSecFromHeader(Message& msg);
|
||||
void LoadActiveConfigs();
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft {
|
|||
namespace Experimentation {
|
||||
namespace AFD {
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_NS("AriaSDK.AFD", "Aria AFD");
|
||||
ARIASDK_LOG_INST_COMPONENT_NS("EventsSDK.AFD", "Aria AFD");
|
||||
|
||||
std::vector<std::string> splitString(std::string str, char delimiter)
|
||||
{
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#include "pal/UtcHelpers.hpp"
|
||||
#include "AFDClientUtils.hpp"
|
||||
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Telemetry::PAL;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
using namespace Microsoft::Applications::Events ::PAL;
|
||||
using namespace std;
|
||||
|
||||
namespace Microsoft {
|
||||
|
@ -375,10 +375,10 @@ namespace Microsoft {
|
|||
return true;
|
||||
}
|
||||
|
||||
Microsoft::Applications::Telemetry::IStorage* AFDConfigCache::_CreateOfflineStorage(const string& storagePath)
|
||||
Microsoft::Applications::Events ::IStorage* AFDConfigCache::_CreateOfflineStorage(const string& storagePath)
|
||||
{
|
||||
// create offline storage
|
||||
Microsoft::Applications::Telemetry::IStorage* pOfflineStorage = new FIFOFileStorage(); ;
|
||||
Microsoft::Applications::Events ::IStorage* pOfflineStorage = new FIFOFileStorage(); ;
|
||||
if (!pOfflineStorage)
|
||||
{
|
||||
ARIASDK_LOG_ERROR("[AFDClient]: Failed to create offline storage");
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace Microsoft {
|
|||
|
||||
std::int64_t GetExpiryTimeInSec() const
|
||||
{
|
||||
std::int64_t currUtcTimestamp = Microsoft::Applications::Telemetry::PAL::getUtcSystemTime();
|
||||
std::int64_t currUtcTimestamp = Microsoft::Applications::Events ::PAL::getUtcSystemTime();
|
||||
return (expiryUtcTimestamp <= currUtcTimestamp) ? 0 : (expiryUtcTimestamp - currUtcTimestamp);
|
||||
}
|
||||
|
||||
|
@ -55,11 +55,11 @@ namespace Microsoft {
|
|||
AFDConfig* GetConfigByRequestName(const std::string& requestName);
|
||||
|
||||
private:
|
||||
Microsoft::Applications::Telemetry::IStorage* _CreateOfflineStorage(const std::string& storagePath);
|
||||
Microsoft::Applications::Events ::IStorage* _CreateOfflineStorage(const std::string& storagePath);
|
||||
|
||||
private:
|
||||
std::string m_OfflineStoragePath;
|
||||
Microsoft::Applications::Telemetry::IStorage* m_pOfflineStorage;
|
||||
Microsoft::Applications::Events ::IStorage* m_pOfflineStorage;
|
||||
|
||||
std::map<std::string, AFDConfig> m_configs;
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace nlohmann;
|
||||
using namespace Microsoft::Applications::Telemetry;
|
||||
using namespace Microsoft::Applications::Telemetry::PAL;
|
||||
using namespace Microsoft::Applications::Events ;
|
||||
using namespace Microsoft::Applications::Events ::PAL;
|
||||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
|
|
|
@ -20,7 +20,7 @@ const static int MAX_RETRY_TIMES = 5;
|
|||
const static int DEFAULT_RETRY_TIME_FACTOR = 8;
|
||||
|
||||
|
||||
namespace PAL = ::Microsoft::Applications::Telemetry::PAL;
|
||||
namespace PAL = ::Microsoft::Applications::Events ::PAL;
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Experimentation { namespace ECS {
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace Microsoft { namespace Applications { namespace Experimentation { names
|
|||
virtual bool RemoveListener(IECSClientCallback* listener);
|
||||
|
||||
// Register a logger to auto-tag events sent by the logger with ECS configuration infos like ETag
|
||||
virtual bool RegisterLogger(Microsoft::Applications::Telemetry::ILogger* pLoger, const std::string& agentName);
|
||||
virtual bool RegisterLogger(Microsoft::Applications::Events ::ILogger* pLoger, const std::string& agentName);
|
||||
|
||||
virtual bool SetUserId(const std::string& userId);
|
||||
|
||||
|
@ -89,7 +89,7 @@ namespace Microsoft { namespace Applications { namespace Experimentation { names
|
|||
void _ValidateECSClientConfiguration(const ECSClientConfiguration& config);
|
||||
void _LogEXPConfigUpdateEvent(EXPConfigUpdateResult result, EXPConfigUpdateSource source);
|
||||
void _LogEXPCleintStateChangeEvent(EXPClientStatus status);
|
||||
void _UpdateLoggerWithEXPConfig(Microsoft::Applications::Telemetry::ILogger* pLogger, std::string agentName);
|
||||
void _UpdateLoggerWithEXPConfig(Microsoft::Applications::Events ::ILogger* pLogger, std::string agentName);
|
||||
void _UpdateLoggersWithEXPConfig();
|
||||
std::int64_t _GetExpiryTimeInSecFromHeader(Message& msg);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft {
|
|||
namespace Experimentation {
|
||||
namespace ECS {
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_NS("AriaSDK.ECS", "Aria ECS");
|
||||
ARIASDK_LOG_INST_COMPONENT_NS("EventsSDK.ECS", "Aria ECS");
|
||||
|
||||
// replace "/" in clientVersion with "_"
|
||||
std::string ConvertClientVersion(const std::string& clientVersion)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "pal/UtcHelpers.hpp"
|
||||
#include "ECSClientUtils.hpp"
|
||||
|
||||
using namespace Microsoft::Applications::Telemetry::PAL;
|
||||
using namespace Microsoft::Applications::Events ::PAL;
|
||||
using namespace std;
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Experimentation { namespace ECS {
|
||||
|
@ -159,7 +159,7 @@ namespace Microsoft { namespace Applications { namespace Experimentation { names
|
|||
}
|
||||
|
||||
// handle the case where local clock is reset
|
||||
std::int64_t value = Microsoft::Applications::Telemetry::PAL::getUtcSystemTime() + DEFAULT_EXPIRE_INTERVAL_IN_SECONDS_MAX;
|
||||
std::int64_t value = Microsoft::Applications::Events ::PAL::getUtcSystemTime() + DEFAULT_EXPIRE_INTERVAL_IN_SECONDS_MAX;
|
||||
if (config.expiryUtcTimestamp > value)
|
||||
{
|
||||
config.expiryUtcTimestamp = value;
|
||||
|
@ -279,7 +279,7 @@ namespace Microsoft { namespace Applications { namespace Experimentation { names
|
|||
}
|
||||
|
||||
int ret = m_pOfflineStorage->SaveItem(configsStr.c_str(), configsStr.size() + 1, NULL);
|
||||
if (Microsoft::Applications::Telemetry::RES_SUCC != ret)
|
||||
if (Microsoft::Applications::Events ::RES_SUCC != ret)
|
||||
{
|
||||
ARIASDK_LOG_ERROR("[ECSClient]: Failed to save configs to offline storage, error=%d).", ret);
|
||||
return false;
|
||||
|
@ -293,7 +293,7 @@ namespace Microsoft { namespace Applications { namespace Experimentation { names
|
|||
ARIASDK_NS::IStorage* ECSConfigCache::_CreateOfflineStorage(const string& storagePath)
|
||||
{
|
||||
// create offline storage
|
||||
ARIASDK_NS::IStorage* pOfflineStorage = new Microsoft::Applications::Telemetry::FIFOFileStorage();
|
||||
ARIASDK_NS::IStorage* pOfflineStorage = new Microsoft::Applications::Events ::FIFOFileStorage();
|
||||
if (!pOfflineStorage)
|
||||
{
|
||||
ARIASDK_LOG_ERROR("[ECSClient]: Failed to create offline storage");
|
||||
|
|
|
@ -26,7 +26,7 @@ struct ECSConfig
|
|||
|
||||
std::int64_t GetExpiryTimeInSec() const
|
||||
{
|
||||
std::int64_t currUtcTimestamp = Microsoft::Applications::Telemetry::PAL::getUtcSystemTime();
|
||||
std::int64_t currUtcTimestamp = Microsoft::Applications::Events ::PAL::getUtcSystemTime();
|
||||
|
||||
return (expiryUtcTimestamp <= currUtcTimestamp) ? 0 : (expiryUtcTimestamp - currUtcTimestamp);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#define STORAGE_SIZE "StorageSize"
|
||||
#define POWER_SOURCE "PowerSource"
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
class IDeviceInformation : public IInformationProvider
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "IPropertyChangedCallback.hpp"
|
||||
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
class IInformationProvider
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#define NETWORK_COST "NetworkCost"
|
||||
#define NETWORK_TYPE "NetworkType"
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
class INetworkInformation : public IInformationProvider
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <vector>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
const unsigned int DB_FULL_NOTIFICATION_DEFAULT_PERCENTAGE = 75;
|
||||
|
@ -249,4 +249,4 @@ class IOfflineStorage {
|
|||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
class IPropertyChangedCallback
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "IInformationProvider.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
class ISystemInformation : public IInformationProvider
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "ILogger.hpp"
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace Models {
|
||||
// *INDENT-ON*
|
||||
|
||||
|
|
|
@ -8,24 +8,24 @@
|
|||
#include <map>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
/// <summary>
|
||||
/// The ACTStatus enumeration contains a set of status code.
|
||||
/// The EVTStatus enumeration contains a set of status code.
|
||||
/// </summary>
|
||||
enum ACTStatus
|
||||
enum EVTStatus
|
||||
{
|
||||
/// <summary>Not supported.</summary>
|
||||
ACTStatus_NotSupported = -2,
|
||||
EVTStatus_NotSupported = -2,
|
||||
/// <summary>General failure</summary>
|
||||
ACTStatus_Fail = -1,
|
||||
EVTStatus_Fail = -1,
|
||||
/// <summary>Success.</summary>
|
||||
ACTStatus_OK = 0,
|
||||
EVTStatus_OK = 0,
|
||||
/// <summary>Already Initialized</summary>
|
||||
ACTStatus_AlreadyInitialized = 1,
|
||||
EVTStatus_AlreadyInitialized = 1,
|
||||
/// <summary>No action done</summary>
|
||||
ACTStatus_NoOp = 2,
|
||||
EVTStatus_NoOp = 2,
|
||||
};
|
||||
|
||||
enum DataCategory
|
||||
|
@ -418,6 +418,6 @@ namespace Microsoft { namespace Applications { namespace Telemetry {
|
|||
const static unsigned gc_NumRejectedReasons = REJECTED_REASON_COUNT;
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
||||
#endif //EVENTPRIORITY_H
|
|
@ -12,7 +12,7 @@
|
|||
#include <map>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
|
@ -300,6 +300,6 @@ namespace Microsoft { namespace Applications { namespace Telemetry {
|
|||
std::map<std::string, EventProperty>* m_propertiesBP;
|
||||
};
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
||||
#endif //MYAPPLICATION_EVENTPROPERTIES_H
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
|
||||
const uint64_t ticksPerSecond = 10000000UL;
|
||||
// Thursday, January 01, 1970 12:00:00 AM
|
||||
|
|
|
@ -210,7 +210,7 @@ namespace Microsoft { namespace Applications { namespace Experimentation { names
|
|||
/// <param name="agentName">A string that contains the name of the agent whose experiment configIds will be
|
||||
/// auto-tagged to events sent by the logger.</param>
|
||||
/// <returns>A boolean value that indicates success (true) or failure (false).</returns>
|
||||
virtual bool RegisterLogger(Microsoft::Applications::Telemetry::ILogger* pLoger, const std::string& agentName) = 0;
|
||||
virtual bool RegisterLogger(Microsoft::Applications::Events ::ILogger* pLoger, const std::string& agentName) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets a list of custom parameters for the request to use to retrieve configurations from the AFD server.
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
#include "Enums.hpp"
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
/// <summary>
|
||||
/// This class is used to manage the Telemetry logging system
|
||||
/// This class is used to manage the Events logging system
|
||||
/// </summary>
|
||||
class ARIASDK_LIBABI IAuthTokensController
|
||||
{
|
||||
|
@ -24,11 +24,11 @@ namespace Microsoft { namespace Applications { namespace Telemetry {
|
|||
/// </summary>
|
||||
/// <param name="type">Ticket type</param>
|
||||
/// <param name="ticketValue">Ticketvalue</param>
|
||||
virtual ACTStatus SetTicketToken(TicketType type, char const* tokenValue) = 0;
|
||||
virtual EVTStatus SetTicketToken(TicketType type, char const* tokenValue) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
||||
#endif //ARIA_IAUTHTOKENS_HPP
|
|
@ -4,7 +4,7 @@
|
|||
#include "Version.hpp"
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
|
@ -27,4 +27,4 @@ class IBandwidthController {
|
|||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -160,7 +160,7 @@ namespace Microsoft { namespace Applications { namespace Experimentation { names
|
|||
/// <param name="pLoger">The logger to be registered with the ECS client</param>
|
||||
/// <param name="agentName">A string that contains the name of the agent.</param>
|
||||
/// <returns>A boolean value that indicates success (true) or failure (false).</returns>
|
||||
virtual bool RegisterLogger(Microsoft::Applications::Telemetry::ILogger* pLoger, const std::string& agentName) = 0;
|
||||
virtual bool RegisterLogger(Microsoft::Applications::Events ::ILogger* pLoger, const std::string& agentName) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets a user ID used as the request parameter for retrieving configurations from the ECS server.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <vector>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
|
@ -288,4 +288,4 @@ class IHttpClient
|
|||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// *INDENT-OFF*
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
// *INDENT-ON*
|
||||
class IHttpClient;
|
||||
class IRuntimeConfig;
|
||||
|
@ -177,7 +177,7 @@ namespace Microsoft {
|
|||
/// The default value is <i>ACTTraceLevel_Error</i>.
|
||||
/// </summary>
|
||||
/// <param name="minimumTraceLevel">The minimum trace level as one of the ACTTraceLevel enumeration values.</param>
|
||||
virtual ACTStatus SetMinimumTraceLevel(ACTTraceLevel minimumTraceLevel) = 0;
|
||||
virtual EVTStatus SetMinimumTraceLevel(ACTTraceLevel minimumTraceLevel) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// [optional] Gets the debug trace level mask, which controls the global verbosity level.
|
||||
|
@ -193,7 +193,7 @@ namespace Microsoft {
|
|||
/// The default value is <i>Non UTC</i>.
|
||||
/// </summary>
|
||||
/// <param name="sdkmode">The SDK mode as one of the SdkModeTypes enumeration values.</param>
|
||||
virtual ACTStatus SetSdkModeType(SdkModeTypes sdkmode) = 0;
|
||||
virtual EVTStatus SetSdkModeType(SdkModeTypes sdkmode) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Aria SDK mode (either <i>Non UTC</i>,
|
||||
|
@ -209,28 +209,28 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="value">A pointer to a character constant that contains the value string.</param>
|
||||
virtual ACTStatus SetProperty(char const* key, char const* value) = 0;
|
||||
virtual EVTStatus SetProperty(char const* key, char const* value) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets an ILogConfiguration property, taking a string for the key, and a uint32_t for the value.
|
||||
/// </summary>
|
||||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="value">A uint32_t that contains the value.</param>
|
||||
virtual ACTStatus SetIntProperty(char const* key, uint32_t value) = 0;
|
||||
virtual EVTStatus SetIntProperty(char const* key, uint32_t value) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets an ILogConfiguration property, taking a string for the key, and a boolean for the value.
|
||||
/// </summary>
|
||||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="value">A boolean that contains the value.</param>
|
||||
virtual ACTStatus SetBoolProperty(char const* key, bool value) = 0;
|
||||
virtual EVTStatus SetBoolProperty(char const* key, bool value) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets an ILogConfiguration property, taking a string for the name, and a ACTStatus pointer for the value.
|
||||
/// Sets an ILogConfiguration property, taking a string for the name, and a EVTStatus pointer for the value.
|
||||
/// </summary>
|
||||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="value">A ACTStatus pointer that points to the value.</param>
|
||||
virtual ACTStatus SetPointerProperty(char const* key, void* value) = 0;
|
||||
/// <param name="value">A EVTStatus pointer that points to the value.</param>
|
||||
virtual EVTStatus SetPointerProperty(char const* key, void* value) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an ILogConfiguration property, taking a string for the key, and a boolean for the error.
|
||||
|
@ -238,7 +238,7 @@ namespace Microsoft {
|
|||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="error">A reference to a boolean that contains the error</param>
|
||||
/// <returns>The property, pointed to by a character constant pointer.</returns>
|
||||
virtual char const* GetProperty(char const* key, ACTStatus& error) const = 0;
|
||||
virtual char const* GetProperty(char const* key, EVTStatus& error) const = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an ILogConfiguration property, taking a string for the key, and a boolean for the error.
|
||||
|
@ -246,7 +246,7 @@ namespace Microsoft {
|
|||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="error">A reference to a boolean that contains the error.</param>
|
||||
/// <returns>The property in a uint32_t.</returns>
|
||||
virtual uint32_t GetIntProperty(char const* key, ACTStatus& error) const = 0;
|
||||
virtual uint32_t GetIntProperty(char const* key, EVTStatus& error) const = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an ILogConfiguration property, taking a string for the key, and a boolean for the error.
|
||||
|
@ -254,36 +254,36 @@ namespace Microsoft {
|
|||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="error">A reference to a boolean that contains the error.</param>
|
||||
/// <returns>The property in a boolean.</returns>
|
||||
virtual bool GetBoolProperty(char const* key, ACTStatus& error) const = 0;
|
||||
virtual bool GetBoolProperty(char const* key, EVTStatus& error) const = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an ILogConfiguration property, API allows to get Aria pointer setting
|
||||
/// </summary>
|
||||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="error">A reference to a boolean that contains the error.</param>
|
||||
/// <returns>The property pointed to by a ACTStatus pointer.</returns>
|
||||
virtual void* GetPointerProperty(char const* key, ACTStatus& error) const = 0;
|
||||
/// <returns>The property pointed to by a EVTStatus pointer.</returns>
|
||||
virtual void* GetPointerProperty(char const* key, EVTStatus& error) const = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets an ILogConfiguration property, taking a string for the key, and a boolean for the value.
|
||||
/// </summary>
|
||||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="value">A boolean that contains the value.</param>
|
||||
inline ACTStatus SetProperty(const char *key, bool value) { return SetBoolProperty(key, value); };
|
||||
inline EVTStatus SetProperty(const char *key, bool value) { return SetBoolProperty(key, value); };
|
||||
|
||||
/// <summary>
|
||||
/// Sets an ILogConfiguration property, taking a string for the name, and a ACTStatus pointer for the value.
|
||||
/// Sets an ILogConfiguration property, taking a string for the name, and a EVTStatus pointer for the value.
|
||||
/// </summary>
|
||||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="value">A ACTStatus pointer that points to the value.</param>
|
||||
inline ACTStatus SetProperty(const char *key, ACTStatus* value) { return SetPointerProperty(key, value); };
|
||||
/// <param name="value">A EVTStatus pointer that points to the value.</param>
|
||||
inline EVTStatus SetProperty(const char *key, EVTStatus* value) { return SetPointerProperty(key, value); };
|
||||
|
||||
/// <summary>
|
||||
/// Sets an ILogConfiguration property, taking a string for the key, and a uint32_t for the value.
|
||||
/// </summary>
|
||||
/// <param name="key">A pointer to a character constant that contains the key string.</param>
|
||||
/// <param name="value">A uint32_t that contains the value.</param>
|
||||
inline ACTStatus SetProperty(const char *key, uint32_t value) { return SetIntProperty(key, value); };
|
||||
inline EVTStatus SetProperty(const char *key, uint32_t value) { return SetIntProperty(key, value); };
|
||||
|
||||
#ifdef _WIN32
|
||||
/// <summary>
|
||||
|
@ -332,10 +332,10 @@ namespace Microsoft {
|
|||
return (*this);
|
||||
}
|
||||
|
||||
inline ConfigKey &operator=(const ACTStatus* value)
|
||||
inline ConfigKey &operator=(const EVTStatus* value)
|
||||
{
|
||||
type = TypePtr;
|
||||
config->SetProperty(key, (ACTStatus *)value);
|
||||
config->SetProperty(key, (EVTStatus *)value);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
|
@ -353,5 +353,5 @@ namespace Microsoft {
|
|||
|
||||
}
|
||||
}
|
||||
} // namespace Microsoft::Applications::Telemetry
|
||||
} // namespace Microsoft::Applications::Events
|
||||
#endif
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
// *INDENT-OFF*
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This class is used to manage the Telemetry logging system
|
||||
/// This class is used to manage the Events logging system
|
||||
/// </summary>
|
||||
class ARIASDK_LIBABI ILogController
|
||||
{
|
||||
|
@ -35,23 +35,23 @@ namespace Microsoft {
|
|||
/// and might flush the global file buffers, i.e. all buffered filesystem data, to disk, which could be
|
||||
/// time consuming.
|
||||
/// </summary>
|
||||
virtual ACTStatus Flush() = 0;
|
||||
virtual EVTStatus Flush() = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Try to send any pending telemetry events in memory or on disk.
|
||||
/// </summary>
|
||||
virtual ACTStatus UploadNow() = 0;
|
||||
virtual EVTStatus UploadNow() = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Pauses the transmission of events to data collector.
|
||||
/// While pasued events will continue to be queued up on client side in cache (either in memory or on disk file).
|
||||
/// </summary>
|
||||
virtual ACTStatus PauseTransmission() = 0;
|
||||
virtual EVTStatus PauseTransmission() = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Resumes the transmission of events to data collector.
|
||||
/// </summary>
|
||||
virtual ACTStatus ResumeTransmission() = 0;
|
||||
virtual EVTStatus ResumeTransmission() = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets transmit profile for event transmission to one of the built-in profiles.
|
||||
|
@ -60,7 +60,7 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="profile">Transmit profile</param>
|
||||
/// <returns>This function doesn't return any value because it always succeeds.</returns>
|
||||
virtual ACTStatus SetTransmitProfile(TransmitProfile profile) = 0;
|
||||
virtual EVTStatus SetTransmitProfile(TransmitProfile profile) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets transmit profile for event transmission.
|
||||
|
@ -69,19 +69,19 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
/// <param name="profile">Transmit profile</param>
|
||||
/// <returns>true if profile is successfully applied, false otherwise</returns>
|
||||
virtual ACTStatus SetTransmitProfile(const std::string& profile) = 0;
|
||||
virtual EVTStatus SetTransmitProfile(const std::string& profile) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Load transmit profiles from JSON config
|
||||
/// </summary>
|
||||
/// <param name="profiles_json">JSON config (see example above)</param>
|
||||
/// <returns>true on successful profiles load, false if config is invalid</returns>
|
||||
virtual ACTStatus LoadTransmitProfiles(const std::string& profiles_json) = 0;
|
||||
virtual EVTStatus LoadTransmitProfiles(const std::string& profiles_json) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Reset transmission profiles to default settings
|
||||
/// </summary>
|
||||
virtual ACTStatus ResetTransmitProfiles() = 0;
|
||||
virtual EVTStatus ResetTransmitProfiles() = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Reset transmission profiles to default settings
|
||||
|
@ -101,6 +101,6 @@ namespace Microsoft {
|
|||
};
|
||||
}
|
||||
}
|
||||
} // namespace Microsoft::Applications::Telemetry
|
||||
} // namespace Microsoft::Applications::Events
|
||||
|
||||
#endif //ARIA_ILOG_CONTROLLER_HPP
|
|
@ -9,12 +9,12 @@
|
|||
#include <string>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
class ILogController;
|
||||
/// <summary>
|
||||
/// This class is used to manage the Telemetry logging system
|
||||
/// This class is used to manage the Events logging system
|
||||
/// </summary>
|
||||
class ARIASDK_LIBABI ILogManager
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ class ARIASDK_LIBABI ILogManager
|
|||
/// <param name="name">Name of the context property</param>
|
||||
/// <param name="value">String value of the context property</param>
|
||||
/// <param name='piiKind'>PIIKind of the context with PiiKind_None as the default</param>
|
||||
virtual ACTStatus SetContext(std::string const& name, std::string const& value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(std::string const& name, std::string const& value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the custom context for the telemetry logging system.
|
||||
|
@ -52,21 +52,21 @@ class ARIASDK_LIBABI ILogManager
|
|||
/// <param name="name">Name of the context property</param>
|
||||
/// <param name="value">Value of the context property</param>
|
||||
/// <param name='piiKind'>PIIKind of the context with PiiKind_None as the default</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, const char *value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, const char *value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">Double value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, double value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, double value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">64-bit Integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, int64_t value, PiiKind piiKind = PiiKind_None) = 0;;
|
||||
virtual EVTStatus SetContext(const std::string& name, int64_t value, PiiKind piiKind = PiiKind_None) = 0;;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.<br>
|
||||
|
@ -74,7 +74,7 @@ class ARIASDK_LIBABI ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">8-bit Integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, int8_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, int8_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.<br>
|
||||
|
@ -82,7 +82,7 @@ class ARIASDK_LIBABI ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">16-bit Integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, int16_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, int16_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.<br>
|
||||
|
@ -90,7 +90,7 @@ class ARIASDK_LIBABI ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">32-bit Integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, int32_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, int32_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.<br>
|
||||
|
@ -98,7 +98,7 @@ class ARIASDK_LIBABI ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">8-bit unsigned integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, uint8_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, uint8_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.<br>
|
||||
|
@ -106,7 +106,7 @@ class ARIASDK_LIBABI ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">16-bit unsigned integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, uint16_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, uint16_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.<br>
|
||||
|
@ -114,7 +114,7 @@ class ARIASDK_LIBABI ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">32-bit unsigned integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, uint32_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, uint32_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.<br>
|
||||
|
@ -122,28 +122,28 @@ class ARIASDK_LIBABI ILogManager
|
|||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">64-bit unsigned integer value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, uint64_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, uint64_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">Boolean value of the property</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, bool value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, bool value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or = 0s a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">.NET time ticks</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, time_ticks_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, time_ticks_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Adds or overrides a property of the global context.
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the property</param>
|
||||
/// <param name="value">GUID</param>
|
||||
virtual ACTStatus SetContext(const std::string& name, GUID_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
virtual EVTStatus SetContext(const std::string& name, GUID_t value, PiiKind piiKind = PiiKind_None) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the ILogger interface of a Logger instance through which to log telemetry events.
|
||||
|
@ -164,4 +164,4 @@ class ARIASDK_LIBABI ILogManager
|
|||
/// </summary>
|
||||
virtual IAuthTokensController* GetAuthTokensController() = 0;
|
||||
};
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <map>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
//Data Type Flags
|
||||
|
@ -164,6 +164,6 @@ class ARIASDK_LIBABI ILogger
|
|||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
||||
#endif //ARIA_ILOGGER_H
|
|
@ -7,7 +7,7 @@
|
|||
#include <map>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
|
@ -193,4 +193,4 @@ class IRuntimeConfig {
|
|||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <string>
|
||||
|
||||
// *INDENT-OFF*
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
// *INDENT-ON*
|
||||
|
||||
class ARIASDK_LIBABI ISemanticContext
|
||||
|
@ -151,6 +151,6 @@ class ARIASDK_LIBABI ISemanticContext
|
|||
};
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
||||
#endif //ISEMANTICCONTEXT_H
|
|
@ -17,12 +17,12 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
|
||||
class LogSessionData;
|
||||
|
||||
/// <summary>
|
||||
/// This class is used to manage the Telemetry logging system
|
||||
/// This class is used to manage the Events logging system
|
||||
/// </summary>
|
||||
class ARIASDK_LIBABI LogManager
|
||||
{
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
|
||||
uint32_t const CurrentTargetVersion = 0x0100;// 1.0
|
||||
/// <summary>
|
||||
/// This class is used to manage the Telemetry logging system
|
||||
/// This class is used to manage the Events logging system
|
||||
/// </summary>
|
||||
class ARIASDK_LIBABI LogManagerProvider
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ namespace Microsoft {
|
|||
static ILogManager* CreateLogManager(char const* apiKey,
|
||||
bool wantController,
|
||||
ILogConfiguration& logConfiguration,
|
||||
ACTStatus& status,
|
||||
EVTStatus& status,
|
||||
#ifdef ANDROID
|
||||
JNIEnv *env,
|
||||
jclass contextClass,
|
||||
|
@ -60,7 +60,7 @@ namespace Microsoft {
|
|||
/// </summary>
|
||||
static ILogManager* CreateLogManager(char const* apiKey,
|
||||
bool wantController,
|
||||
ACTStatus& status,
|
||||
EVTStatus& status,
|
||||
#ifdef ANDROID
|
||||
JNIEnv *env,
|
||||
jclass contextClass,
|
||||
|
@ -75,7 +75,7 @@ namespace Microsoft {
|
|||
/// <param name="status">Status.</param>
|
||||
/// </summary>
|
||||
static ILogManager* CreateLogManager(char const* apiKey,
|
||||
ACTStatus& status,
|
||||
EVTStatus& status,
|
||||
#ifdef ANDROID
|
||||
JNIEnv *env,
|
||||
jclass contextClass,
|
||||
|
@ -90,13 +90,13 @@ namespace Microsoft {
|
|||
/// <param name="apiKey">API Key.</param>
|
||||
/// <param name="status">Status.</param>
|
||||
/// </summary>
|
||||
static ILogManager* GetLogManager(char const* apiKey, ACTStatus& status, uint32_t targetVersion = CurrentTargetVersion);
|
||||
static ILogManager* GetLogManager(char const* apiKey, EVTStatus& status, uint32_t targetVersion = CurrentTargetVersion);
|
||||
|
||||
/// <summary>
|
||||
/// Removes an guste or host LogManager created with passed API key with the current configuration.
|
||||
/// <param name="apiKey">API Key.</param>
|
||||
/// </summary>
|
||||
static ACTStatus DestroyLogManager(char const* apiKey);
|
||||
static EVTStatus DestroyLogManager(char const* apiKey);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
#include <stdint.h>
|
||||
|
||||
|
||||
//#define Telemetry Telemetry_v5
|
||||
//#define Events Telemetry_v5
|
||||
|
||||
#define ARIASDK_NS_BEGIN Microsoft { namespace Applications { namespace Telemetry
|
||||
#define ARIASDK_NS_BEGIN Microsoft { namespace Applications { namespace Events
|
||||
#define ARIASDK_NS_END }}
|
||||
#define ARIASDK_NS Microsoft::Applications::Telemetry
|
||||
#define ARIASDK_NS Microsoft::Applications::Events
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
#include <stdint.h>
|
||||
|
||||
|
||||
//#define Telemetry Telemetry_v@BUILD_VERSION_MAJOR@
|
||||
//#define Events Telemetry_v@BUILD_VERSION_MAJOR@
|
||||
|
||||
#define ARIASDK_NS_BEGIN Microsoft { namespace Applications { namespace Telemetry
|
||||
#define ARIASDK_NS_BEGIN Microsoft { namespace Applications { namespace Events
|
||||
#define ARIASDK_NS_END }}
|
||||
#define ARIASDK_NS Microsoft::Applications::Telemetry
|
||||
#define ARIASDK_NS Microsoft::Applications::Events
|
||||
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
|
||||
|
||||
uint64_t const Version =
|
||||
|
@ -37,4 +37,4 @@ namespace {
|
|||
#define ARIASDK_PAL_@PAL_IMPLEMENTATION_UPPER@ 1
|
||||
|
||||
|
||||
}}} // namespace Microsoft::Applications::Telemetry
|
||||
}}} // namespace Microsoft::Applications::Events
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
namespace ARIASDK_NS_BEGIN {
|
||||
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(OfflineStorageHandler, "AriaSDK.StorageHandler", "Aria telemetry client - OfflineStorageHandler class");
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(OfflineStorageHandler, "EventsSDK.StorageHandler", "Events telemetry client - OfflineStorageHandler class");
|
||||
|
||||
OfflineStorageHandler::OfflineStorageHandler(LogConfiguration& configuration, IRuntimeConfig& runtimeConfig)
|
||||
: m_logConfiguration(configuration),
|
||||
|
@ -24,7 +24,7 @@ OfflineStorageHandler::OfflineStorageHandler(LogConfiguration& configuration, IR
|
|||
m_queryDbSize(0),
|
||||
m_isStorageFullNotificationSend(false)
|
||||
{
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
int percentage = configuration.GetIntProperty(CFG_INT_CACHE_MEMORY_FULL_NOTIFICATION_PERCENTAGE, error);
|
||||
unsigned int cacheMemorySizeLimitInBytes = configuration.GetIntProperty(CFG_INT_RAM_QUEUE_SIZE, error);
|
||||
if (percentage > 0 && percentage <= 100)
|
||||
|
@ -49,7 +49,7 @@ OfflineStorageHandler::~OfflineStorageHandler()
|
|||
void OfflineStorageHandler::Initialize(IOfflineStorageObserver& observer)
|
||||
{
|
||||
m_observer = &observer;
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
unsigned int cacheMemorySizeLimitInBytes = m_logConfiguration.GetIntProperty(CFG_INT_RAM_QUEUE_SIZE, error);
|
||||
if (cacheMemorySizeLimitInBytes > 0)
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ bool OfflineStorageHandler::StoreRecord(StorageRecord const& record)
|
|||
CommonLogManagerInternal::DispatchEvent(evt);
|
||||
m_isStorageFullNotificationSend = true;
|
||||
}
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
unsigned int cacheMemorySizeLimitInBytes = m_logConfiguration.GetIntProperty(CFG_INT_RAM_QUEUE_SIZE, error);
|
||||
|
||||
if (m_queryDbSize > cacheMemorySizeLimitInBytes)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
namespace ARIASDK_NS_BEGIN {
|
||||
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(OfflineStorage_SQLite, "AriaSDK.Storage", "Aria telemetry client - OfflineStorage_SQLite class");
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(OfflineStorage_SQLite, "EventsSDK.Storage", "Events telemetry client - OfflineStorage_SQLite class");
|
||||
|
||||
static int const CURRENT_SCHEMA_VERSION = 1;
|
||||
#define TABLE_NAME_EVENTS "events"
|
||||
|
@ -25,7 +25,7 @@ OfflineStorage_SQLite::OfflineStorage_SQLite(LogConfiguration& configuration, IR
|
|||
m_lastReadCount(0),
|
||||
m_isStorageFullNotificationSend(false)
|
||||
{
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
int percentage = configuration.GetIntProperty(CFG_INT_CACHE_FILE_FULL_NOTIFICATION_PERCENTAGE, error);
|
||||
int cacheFileSizeLimitInBytes = configuration.GetIntProperty(CFG_INT_CACHE_FILE_SIZE, error);
|
||||
m_offlineStorageFileName = configuration.GetProperty(CFG_STR_CACHE_FILE_PATH, error);
|
||||
|
|
|
@ -298,7 +298,7 @@ class SqliteDB {
|
|||
ARIASDK_LOG_DECL_COMPONENT_CLASS();
|
||||
};
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(SqliteDB, "AriaSDK.SQLiteDB", "Aria telemetry client - SqliteDB class");
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(SqliteDB, "EventsSDK.SQLiteDB", "Events telemetry client - SqliteDB class");
|
||||
|
||||
//---
|
||||
|
||||
|
@ -561,7 +561,7 @@ class SqliteStatement {
|
|||
ARIASDK_LOG_DECL_COMPONENT_CLASS();
|
||||
};
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(SqliteStatement, "AriaSDK.SQLiteStatement", "Aria telemetry client - Sqlite statement class");
|
||||
ARIASDK_LOG_INST_COMPONENT_CLASS(SqliteStatement, "EventsSDK.SQLiteStatement", "Events telemetry client - Sqlite statement class");
|
||||
|
||||
|
||||
} ARIASDK_NS_END
|
||||
|
|
|
@ -12,7 +12,7 @@ Packager::Packager(LogConfiguration& configuration, IRuntimeConfig const& runtim
|
|||
: m_runtimeConfig(runtimeConfig)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(configuration);
|
||||
ACTStatus error;
|
||||
EVTStatus error;
|
||||
m_forcedTenantToken = toLower(configuration.GetProperty("forcedTenantToken", error));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "DeviceInformationImpl.hpp"
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
///// IDeviceInformation API
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "IDeviceInformation.hpp"
|
||||
#include "InformationProviderImpl.hpp"
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
class DeviceInformationImpl : public IDeviceInformation
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <excpt.h>
|
||||
#endif
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
InformatonProviderImpl::InformatonProviderImpl():m_registredCount(0)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <vector>
|
||||
#include <mutex>
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
class InformatonProviderImpl : public IInformationProvider
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "NetworkInformationImpl.hpp"
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "InformationProviderimpl.hpp"
|
||||
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
class NetworkInformationImpl : public INetworkInformation
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace ARIASDK_NS_BEGIN {
|
|||
namespace PAL {
|
||||
|
||||
|
||||
ARIASDK_LOG_INST_COMPONENT_NS("AriaSDK.PAL", "Aria telemetry client - platform abstraction layer");
|
||||
ARIASDK_LOG_INST_COMPONENT_NS("EventsSDK.PAL", "Events telemetry client - platform abstraction layer");
|
||||
|
||||
|
||||
namespace detail {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "IInformationProvider.hpp"
|
||||
#include "InformationProviderImpl.hpp"
|
||||
|
||||
namespace Microsoft { namespace Applications { namespace Telemetry {
|
||||
namespace Microsoft { namespace Applications { namespace Events {
|
||||
namespace PAL {
|
||||
|
||||
class SystemInformationImpl : public ISystemInformation
|
||||
|
|
|
@ -18,7 +18,7 @@ DEFINE_GUID(IID_INetworkCostManager2, 0xdcb00008, 0x570f, 0x4a9b, 0x8d, 0x69, 0x
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
namespace Windows {
|
||||
|
||||
// Malwarebytes have been detected
|
||||
|
|
|
@ -59,7 +59,7 @@ using namespace std;
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
|
||||
namespace Windows {
|
||||
|
||||
|
@ -256,8 +256,8 @@ namespace Microsoft {
|
|||
}
|
||||
}
|
||||
|
||||
namespace MAT = Microsoft::Applications::Telemetry;
|
||||
namespace MATW = Microsoft::Applications::Telemetry::Windows;
|
||||
namespace MAT = Microsoft::Applications::Events;
|
||||
namespace MATW = Microsoft::Applications::Events::Windows;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
namespace PAL
|
||||
{
|
||||
/* Value returned on computers with no network adapter available */
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
|
||||
namespace PAL
|
||||
{
|
||||
namespace MATP = ::Microsoft::Applications::Telemetry::PAL;
|
||||
namespace MATP = ::Microsoft::Applications::Events ::PAL;
|
||||
|
||||
NetworkInformationImpl::NetworkInformationImpl(): m_info_helper(), m_registredCount(0){ };
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
namespace PAL
|
||||
{
|
||||
const std::string WindowsOSName = "Windows Desktop";
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry
|
||||
namespace Events
|
||||
{
|
||||
// Convert a bias in minutes to the ISO 8601 time zone representaiton.
|
||||
// ISO 8601 examples: +01:30, -08
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
class WindowsEnvironmentInfo
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace Microsoft {
|
|||
class EventCore;
|
||||
class ITestCallback;
|
||||
|
||||
namespace Telemetry
|
||||
namespace Events
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
|
@ -228,7 +228,7 @@ namespace Microsoft {
|
|||
MeasurementMap^ ToPlatformMeasurementMap(const std::map<std::string, double>& map);
|
||||
|
||||
EditablePropertyMap^ ToPlatformEditablePropertyMap(const std::map<std::string, std::string>& map);
|
||||
EditablePropertyMap^ ToPlatformEditablePropertyMap(const std::map<std::string, Microsoft::Applications::Telemetry::EventProperty>& map);
|
||||
EditablePropertyMap^ ToPlatformEditablePropertyMap(const std::map<std::string, Microsoft::Applications::Events ::EventProperty>& map);
|
||||
|
||||
EditableMeasurementMap^ ToPlatformEditableMeasurementMap(const std::map<std::string, double>& map);
|
||||
EditablePropertyMap^ CreateEditablePropertyMap(PropertyMap^source = nullptr); // ref new Map<String^, String^>();
|
||||
|
@ -252,6 +252,6 @@ namespace Microsoft {
|
|||
}
|
||||
}
|
||||
|
||||
namespace MAT = Microsoft::Applications::Telemetry;
|
||||
namespace MAT = Microsoft::Applications::Events ;
|
||||
|
||||
#endif
|
|
@ -10,7 +10,7 @@ namespace ARIASDK_NS_BEGIN {
|
|||
|
||||
bool IsUtcRegistrationEnabledinWindows()
|
||||
{
|
||||
return ::Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.System.Diagnostics.Telemetry.PlatformTelemetryClient");
|
||||
return ::Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.System.Diagnostics.Events .PlatformTelemetryClient");
|
||||
}
|
||||
|
||||
bool RegisterIkeyWithWindowsTelemetry(std::string const& ikey, int storageSize, int uploadQuotaSize)
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
|
||||
namespace Microsoft {
|
||||
namespace Applications {
|
||||
namespace Telemetry {
|
||||
namespace Events {
|
||||
namespace PAL
|
||||
{
|
||||
using namespace ::Windows::Networking::Connectivity;
|
||||
using namespace ::Windows::Devices::Input;
|
||||
|
||||
using namespace Microsoft::Applications::Telemetry::Windows;
|
||||
using namespace Microsoft::Applications::Events ::Windows;
|
||||
using namespace ::Windows::Security::ExchangeActiveSyncProvisioning;
|
||||
|
||||
/**
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче