Files
UnrealEngineUWP/Engine/Source/Developer/EditorAnalyticsSession/Public/EditorSessionSummarySender.h
patrick laflamme 30017ee6f0 #jira UE-92231 - Editor session summary event doesn't have any link to CrashGUID
- Implemented a special logger inside CrashReportClientEditor to capture and save important events such as crash reporting (along with the CrashGUID)
  - When CrashReportClientEditor sends all the Editor summary events, if an error was detected in the session being sent, the mini-log for that session is attached to the analytic event.

#rb Chris.Gagnon, Jamie.Dale
#lockdown cristina.riverun

#ROBOMERGE-SOURCE: CL 12935952 in //UE4/Release-4.25/... via CL 12935970 via CL 12935996
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12936020 by patrick laflamme in Main branch]
2020-04-20 15:38:55 -04:00

40 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/UnrealString.h"
#include "HAL/Platform.h"
#include "Misc/Optional.h"
#include "Containers/Map.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 uint32 InCurrentSessionProcessId);
~FEditorSessionSummarySender();
void Tick(float DeltaTime);
void Shutdown();
void SetMonitorDiagnosticLogs(TMap<uint32, FString>&& Logs);
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;
uint32 CurrentSessionProcessId;
TMap<uint32, FString> MonitorMiniLogs; // Maps Monitor Process ID/Monitor Log
};