Skip to content

Diagnostics

Summary

MembersDescriptions
public DECLARE_DELEGATE_OneParam(FGetCustomDiagnosticMetadata,FRHAPI_JsonObject &)Bindable delegate to modify custom metadata to add to diagnostic reports. Can be used by a project to add data to the Metadata section.
public DECLARE_DELEGATE_OneParam(FRH_OnDiagnosticReportComplete,const TSharedRef< const FRH_DiagnosticReportGenerator > &)Bindable delegate to notify that a report generation is complete.
class FRH_DiagnosticReportGeneratorReport generator worker, which is responsible for collecting information from various locations, organizing the report, and then writing it to a destination.
class FRH_DiagnosticsClass to handle initializing and running a diagnostic. Tracks and stores local state from the running engine for tracking previous errors.
class URH_DiagnosticsBlueprintLibraryWrapper library to generate diagnostic reports via blueprint.
struct FRH_DiagnosticReportOptionsOptions for generating a diagnostic report.

Members

public DECLARE_DELEGATE_OneParam(FGetCustomDiagnosticMetadata,FRHAPI_JsonObject &)

Bindable delegate to modify custom metadata to add to diagnostic reports. Can be used by a project to add data to the Metadata section.

public DECLARE_DELEGATE_OneParam(FRH_OnDiagnosticReportComplete,const TSharedRef< const FRH_DiagnosticReportGenerator > &)

Bindable delegate to notify that a report generation is complete.

class FRH_DiagnosticReportGenerator

class FRH_DiagnosticReportGenerator
: public FRH_AsyncTaskHelper

Report generator worker, which is responsible for collecting information from various locations, organizing the report, and then writing it to a destination.

Summary

MembersDescriptions
public TSharedPtr< FJsonObject > MetadataMetadata JSON generated by the report
public TSharedPtr< FJsonObject > WebRequestsWeb Request JSON generated by the report
public TSharedPtr< FJsonObject > DeviceDataDevice Data JSON generated by the report
public TSharedPtr< FJsonObject > ErrorsErrors JSON generated by the report
public TSharedPtr< FJsonObject > FinalReportFinal combined report
public FString FinalReportStringFinal combined report (serialized as string)
public FString ReportFilenameFilename the report was written to (if requested)
public bool bCloudWriteSuccesfulWhether the cloud write was successful (if requested)
public inline FRH_DiagnosticReportGenerator()Default constructor
public inline virtual bool CanStart() constCheck if report generation can start based on the current stage.
public inline virtual void Start(const FRH_DiagnosticReportOptions & InOptions)Start generating a report with the given options
protected FRH_DiagnosticReportOptions OptionsOptions for generating the report
protected ReportGenerationStage StageCurrent stage of report generation
protected inline void StageComplete()Called when a stage is complete, increments the stage and calls the appropriate function to start the next stage
protected void GenerateMetadata()generates the Metadata object
protected void GenerateWebRequests()Generates the WebRequests object.
protected void GenerateDeviceData()Generates the DeviceData object.
protected void GenerateErrorsData()Generates the Errors object.
protected void GenerateFinalReport()Generates a final report in JSON format, stores in Report, and then triggers a delegate.
protected void WriteToFile()Writes the current Report value to the filename specified in options (or a default filename if none is specified)
protected void WriteToCloud()Writes the current Report value to the cloud (based on the RallyHere integration settings)
protected inline virtual FString GetName() constGets the name of this object for reporting and debugging.
protected inline virtual void ExecuteCallback(bool bSuccess) constExecute completion callback.
enum ReportGenerationStageGeneration stage for report generation

Members

public TSharedPtr< FJsonObject > Metadata

Metadata JSON generated by the report

public TSharedPtr< FJsonObject > WebRequests

Web Request JSON generated by the report

public TSharedPtr< FJsonObject > DeviceData

Device Data JSON generated by the report

public TSharedPtr< FJsonObject > Errors

Errors JSON generated by the report

public TSharedPtr< FJsonObject > FinalReport

Final combined report

public FString FinalReportString

Final combined report (serialized as string)

public FString ReportFilename

Filename the report was written to (if requested)

public bool bCloudWriteSuccesful

Whether the cloud write was successful (if requested)

public inline FRH_DiagnosticReportGenerator()

Default constructor

public inline virtual bool CanStart() const

Check if report generation can start based on the current stage.

public inline virtual void Start(const FRH_DiagnosticReportOptions & InOptions)

Start generating a report with the given options

protected FRH_DiagnosticReportOptions Options

Options for generating the report

protected ReportGenerationStage Stage

Current stage of report generation

protected inline void StageComplete()

Called when a stage is complete, increments the stage and calls the appropriate function to start the next stage

protected void GenerateMetadata()

generates the Metadata object

protected void GenerateWebRequests()

Generates the WebRequests object.

protected void GenerateDeviceData()

Generates the DeviceData object.

protected void GenerateErrorsData()

Generates the Errors object.

protected void GenerateFinalReport()

Generates a final report in JSON format, stores in Report, and then triggers a delegate.

protected void WriteToFile()

Writes the current Report value to the filename specified in options (or a default filename if none is specified)

protected void WriteToCloud()

Writes the current Report value to the cloud (based on the RallyHere integration settings)

protected inline virtual FString GetName() const

Gets the name of this object for reporting and debugging.

protected inline virtual void ExecuteCallback(bool bSuccess) const

Execute completion callback.

enum ReportGenerationStage

ValuesDescriptions
Unstarted
Metadata
WebRequests
DeviceData
Errors
FinalReport
WriteToFile
WriteToCloud
Complete

Generation stage for report generation

class FRH_Diagnostics

class FRH_Diagnostics
: public TSharedFromThis< FRH_Diagnostics >

Class to handle initializing and running a diagnostic. Tracks and stores local state from the running engine for tracking previous errors.

Summary

MembersDescriptions
public FGetCustomDiagnosticMetadata CustomDiagnosticMetadataDelegateDelegate to bind to to add extra custom data to the diagnostic report.
public TArray< FNetworkFailure>NetworkFailures
public TArray< FTravelFailure>TravelFailures
public FRH_Diagnostics()
public virtual ~FRH_Diagnostics() = default
public virtual void Initialize()Initialize the system.
public virtual void Uninitialize()Safely tears down the system.
public inline virtual void ClearCache()Clears the diagnostics cache.
public virtual void GenerateReport(const FRH_DiagnosticReportOptions & Options) constGenerates a report in JSON format.
public inline virtual void OnNetworkFailure(UWorld * World,UNetDriver * NetDriver,ENetworkFailure::Type FailureType,const FString & ErrorString)Called when there was a network failure trying to connect to the instance.
public inline virtual void OnTravelFailure(UWorld * pWorld,ETravelFailure::Type FailureType,const FString & ErrorString)Called when there is a travel failure to the instance map.

Members

public FGetCustomDiagnosticMetadata CustomDiagnosticMetadataDelegate

Delegate to bind to to add extra custom data to the diagnostic report.

public TArray< FNetworkFailure>NetworkFailures

public TArray< FTravelFailure>TravelFailures

public FRH_Diagnostics()

public virtual ~FRH_Diagnostics() = default

public virtual void Initialize()

Initialize the system.

public virtual void Uninitialize()

Safely tears down the system.

public inline virtual void ClearCache()

Clears the diagnostics cache.

public virtual void GenerateReport(const FRH_DiagnosticReportOptions & Options) const

Generates a report in JSON format.

Parameters

  • World The context world object.

  • Options Options for the generated report.

Returns

The generated object

public inline virtual void OnNetworkFailure(UWorld * World,UNetDriver * NetDriver,ENetworkFailure::Type FailureType,const FString & ErrorString)

Called when there was a network failure trying to connect to the instance.

Parameters

  • World The world that was being connected to.

  • NetDriver The net driver that was being used to connect.

  • FailureType The type of failure that occurred.

  • ErrorString The error string associated with the failure.

public inline virtual void OnTravelFailure(UWorld * pWorld,ETravelFailure::Type FailureType,const FString & ErrorString)

Called when there is a travel failure to the instance map.

Parameters

  • pWorld The world that was being traveled to.

  • FailureType The type of failure that occurred.

  • ErrorString The error string associated with the failure.

class URH_DiagnosticsBlueprintLibrary

class URH_DiagnosticsBlueprintLibrary
: public UBlueprintFunctionLibrary

Wrapper library to generate diagnostic reports via blueprint.

Summary

MembersDescriptions

Members

struct FRH_DiagnosticReportOptions

Options for generating a diagnostic report.

Summary

MembersDescriptions
public bool bIncludeMetadataWhether to include metadata in the report
public FRHAPI_JsonObject CustomMetadataMetadata to include in the report
public bool bIncludeWebRequestsWhether to include web request data in the report
public bool bIncludeDeviceDataWhether to include device data in the report
public bool bIncludeErrorsWhether to include errors data in the report
public bool bWriteToFileWhether to write to a file when the report is complete
public FString OutputFilenameOptional filename to write the report to if bWiteToFile is set (otherwise, generates a name)
public bool bWriteToCloudWhether to write to cloud when the report is complete
public TWeakObjectPtr< UWorld > WorldWorld to use to acquire RH subsystems and information
public TWeakPtr< const FRH_Diagnostics>DiagnosticsTrackerDiagnostics object to use to pull tracked diagnostics
public FRH_OnDiagnosticReportComplete OnReportCompleteDelegate fired when report is complete
public inline FRH_DiagnosticReportOptions()Default constructor, defaults to everything enabled
public inline FRH_DiagnosticReportOptions(DiagnosticReportPreset Preset)Preset constructor, for ease of use
enum DiagnosticReportPresetPreset for enabling/disabling various diagnostic report options

Members

public bool bIncludeMetadata

Whether to include metadata in the report

public FRHAPI_JsonObject CustomMetadata

Metadata to include in the report

public bool bIncludeWebRequests

Whether to include web request data in the report

public bool bIncludeDeviceData

Whether to include device data in the report

public bool bIncludeErrors

Whether to include errors data in the report

public bool bWriteToFile

Whether to write to a file when the report is complete

public FString OutputFilename

Optional filename to write the report to if bWiteToFile is set (otherwise, generates a name)

public bool bWriteToCloud

Whether to write to cloud when the report is complete

public TWeakObjectPtr< UWorld > World

World to use to acquire RH subsystems and information

public TWeakPtr< const FRH_Diagnostics>DiagnosticsTracker

Diagnostics object to use to pull tracked diagnostics

public FRH_OnDiagnosticReportComplete OnReportComplete

Delegate fired when report is complete

public inline FRH_DiagnosticReportOptions()

Default constructor, defaults to everything enabled

public inline FRH_DiagnosticReportOptions(DiagnosticReportPreset Preset)

Preset constructor, for ease of use

enum DiagnosticReportPreset

ValuesDescriptions
AllEnabledEnable all options
AllDisabledDisable all options

Preset for enabling/disabling various diagnostic report options