You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Added AppId, AppVersion and UserId as FEditorAnalyticSession members and updated FEditorSessionSummaryWriter to write them. - Changed FEngineAnalytics::GetProvider() to return IAnalyticsProviderET rather than IAnalyticsProvider. - Updated FEditorSessionSummarySender to embed the AppId/AppVersion/UserId as attribute when sending the summary event and also configured the AnalyticsProvider to use the SessionID/AppID/AppVersion/UserID of the event rather than the current one. - Added a function to return the current IAnalyticProviderET configuration. #rb Wes.Hunt Edigrated 11445334 and 11459406. [CL 11512055 by Patrick Laflamme in 4.25 branch]
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/UnrealString.h"
|
|
#include "HAL/Platform.h"
|
|
#include "Misc/Optional.h"
|
|
|
|
struct FEditorAnalyticsSession;
|
|
class IAnalyticsProviderET;
|
|
|
|
/**
|
|
* Sender of SessionSummary events from all editor sessions in-between runs.
|
|
* Separated from Writer to make it easier to run it out-of-process.
|
|
*/
|
|
class EDITORANALYTICSSESSION_API FEditorSessionSummarySender
|
|
{
|
|
public:
|
|
FEditorSessionSummarySender(IAnalyticsProviderET& InAnalyticsProvider, const FString& InSenderName, const int32 InCurrentSessionProcessId);
|
|
~FEditorSessionSummarySender();
|
|
|
|
void Tick(float DeltaTime);
|
|
void Shutdown();
|
|
|
|
void SetCurrentSessionExitCode(const int32 InCurrentSessionProcessId, const int32 InExitCode);
|
|
bool FindCurrentSession(FEditorAnalyticsSession& OutSession) const;
|
|
|
|
private:
|
|
/** Send any stored Sessions. */
|
|
void SendStoredSessions(const bool bForceSendCurrentSession = false) const;
|
|
void SendSessionSummaryEvent(const FEditorAnalyticsSession& Session) const;
|
|
|
|
private:
|
|
float HeartbeatTimeElapsed;
|
|
IAnalyticsProviderET& AnalyticsProvider;
|
|
FString Sender;
|
|
|
|
int32 CurrentSessionProcessId;
|
|
TOptional<int32> CurrentSessionExitCode;
|
|
};
|