Skip to content

Diagnostics

Summary

MembersDescriptions
public DECLARE_DELEGATE_RetVal(TSharedPtr< FJsonObject >,FGetCustomDiagnosticMetadata)Bindable delegate to get 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 URH_DiagnosticsClass to handle initializing and running a diagnostic (blueprint compatible). Tracks and stores local state from the running engine for tracking previous errors.
struct FRH_DiagnosticReportOptionsOptions for generating a diagnostic report.

Members

public DECLARE_DELEGATE_RetVal(TSharedPtr< FJsonObject >,FGetCustomDiagnosticMetadata)

Bindable delegate to get 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 > 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 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`](#classFRH__DiagnosticReportGenerator_1a85b1180f4061f29eab73fb437d0155aa)

Web Request JSON generated by the report


#### `public TSharedPtr< FJsonObject > `[`DeviceData`](#classFRH__DiagnosticReportGenerator_1a133616f3b2dd1346fbc523f5a0d69fa3)

Device Data JSON generated by the report


#### `public TSharedPtr< FJsonObject > `[`FinalReport`](#classFRH__DiagnosticReportGenerator_1a01e3f8bdf942b47e837c37041fdead39)

Final combined report


#### `public FString `[`FinalReportString`](#classFRH__DiagnosticReportGenerator_1afc2d4a815c5f764bfe95db525bb9bfaa)

Final combined report (serialized as string)


#### `public FString `[`ReportFilename`](#classFRH__DiagnosticReportGenerator_1a96030bd6e01d0812fa7c5f83290743e4)

Filename the report was written to (if requested)


#### `public bool `[`bCloudWriteSuccesful`](#classFRH__DiagnosticReportGenerator_1a1f528842b4366f89d4c3fd2b9e5a5cde)

Whether the cloud write was successful (if requested)


#### `public inline `[`FRH_DiagnosticReportGenerator`](#classFRH__DiagnosticReportGenerator_1a3fd53f68b477800cabcb8d46a60e23b3)`()`

Default constructor


#### `public inline virtual bool `[`CanStart`](#classFRH__DiagnosticReportGenerator_1ab4f3e43ce35b928c9f35369cd6e467e0)`() const`

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


#### `public inline virtual void `[`Start`](#classFRH__DiagnosticReportGenerator_1a77831fc2db09b2125df778a92a2747e8)`(const `[`FRH_DiagnosticReportOptions`](Diagnostics.md#structFRH__DiagnosticReportOptions)` & InOptions)`

Start generating a report with the given options


#### `protected `[`FRH_DiagnosticReportOptions`](Diagnostics.md#structFRH__DiagnosticReportOptions)` `[`Options`](#classFRH__DiagnosticReportGenerator_1a7bdb973029e0efe62b485a5196c8dba8)

Options for generating the report


#### `protected `[`ReportGenerationStage`](Diagnostics.md#classFRH__DiagnosticReportGenerator_1a5c19847194bbebf1a2063c7923fff956)` `[`Stage`](#classFRH__DiagnosticReportGenerator_1a571554fe0b1cc312524732393a4c16dc)

Current stage of report generation


#### `protected inline void `[`StageComplete`](#classFRH__DiagnosticReportGenerator_1a344b3f8c1f38f4b139ec2a9a845b2bcf)`()`

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


#### `protected void `[`GenerateMetadata`](#classFRH__DiagnosticReportGenerator_1a0213e14f6775233d2d605ae202d550d8)`()`

generates the Metadata object


#### `protected void `[`GenerateWebRequests`](#classFRH__DiagnosticReportGenerator_1a0869b734e91c6cbc4ed9a09b208948b0)`()`

Generates the WebRequests object.


#### `protected void `[`GenerateDeviceData`](#classFRH__DiagnosticReportGenerator_1ab74ba7a9a1990c4e76b3c30ae3b2f031)`()`

Generates the DeviceData object.


#### `protected void `[`GenerateFinalReport`](#classFRH__DiagnosticReportGenerator_1a000d51386a59cd0c935f460b02560c3d)`()`

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


#### `protected void `[`WriteToFile`](#classFRH__DiagnosticReportGenerator_1a5708e0d28893c26078c858ec2c070f41)`()`

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


#### `protected void `[`WriteToCloud`](#classFRH__DiagnosticReportGenerator_1a63bb491d9e9569bf314db5f5ad644426)`()`

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


#### `protected inline virtual FString `[`GetName`](#classFRH__DiagnosticReportGenerator_1a9d5777a96be8b8cf23a749e83694041b)`() const`

Gets the name of this object for reporting and debugging.


#### `protected inline virtual void `[`ExecuteCallback`](#classFRH__DiagnosticReportGenerator_1a3710264b20ae073909f0e7b458b8669b)`(bool bSuccess) const`

Execute completion callback.


#### `enum `[`ReportGenerationStage`](#classFRH__DiagnosticReportGenerator_1a5c19847194bbebf1a2063c7923fff956)
ValuesDescriptions
Unstarted
Metadata
WebRequests
DeviceData
FinalReport
WriteToFile
WriteToCloud
Complete

Generation stage for report generation


## class `URH_Diagnostics`
class URH_Diagnostics
: public UObject

Class to handle initializing and running a diagnostic (blueprint compatible). 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 void Initialize()Initialize the system.
public void Uninitialize()Safely tears down the system.
public inline void ClearCache()Clears the diagnostics cache.
public void GenerateReport(const FRH_DiagnosticReportOptions & Options) constGenerates a report in JSON format.

Members

public FGetCustomDiagnosticMetadata CustomDiagnosticMetadataDelegate

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


#### `public void `[`Initialize`](#classURH__Diagnostics_1a09db63ade24dff6ca72fa074123e2ae4)`()`

Initialize the system.


#### `public void `[`Uninitialize`](#classURH__Diagnostics_1aef532309fb4b7286c73b1d13e28ec724)`()`

Safely tears down the system.


#### `public inline void `[`ClearCache`](#classURH__Diagnostics_1ae4b65389f97cffb4688e812dbbfe1299)`()`

Clears the diagnostics cache.


#### `public void `[`GenerateReport`](#classURH__Diagnostics_1a9a78e0f94f71290018966989baed3988)`(const `[`FRH_DiagnosticReportOptions`](Diagnostics.md#structFRH__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


## struct `FRH_DiagnosticReportOptions`

Options for generating a diagnostic report.

Summary

MembersDescriptions
public bool bIncludeMetadataWhether to include metadata 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 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 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 bool `[`bIncludeWebRequests`](#structFRH__DiagnosticReportOptions_1ab1ebb42b4f10ebd632720851eb654541)

Whether to include web request data in the report


#### `public bool `[`bIncludeDeviceData`](#structFRH__DiagnosticReportOptions_1a260c471a4f8f96e1b636bae274bec475)

Whether to include device data in the report


#### `public bool `[`bWriteToFile`](#structFRH__DiagnosticReportOptions_1a0f74b39a745c22ca3ab9ca2152d78276)

Whether to write to a file when the report is complete


#### `public FString `[`OutputFilename`](#structFRH__DiagnosticReportOptions_1a8847fb4f97e1594947ae2a9c60377d33)

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


#### `public bool `[`bWriteToCloud`](#structFRH__DiagnosticReportOptions_1ac9a9923d332c7e2ba7b4948dc5b4597c)

Whether to write to cloud when the report is complete


#### `public TWeakObjectPtr< UWorld > `[`World`](#structFRH__DiagnosticReportOptions_1aeb72d652bae819e6eca21c94b2841d88)

World to use to acquire RH subsystems and information


#### `public FRH_OnDiagnosticReportComplete `[`OnReportComplete`](#structFRH__DiagnosticReportOptions_1a05d9cecaa07d18d9fb062ecb6a81d2fd)

Delegate fired when report is complete


#### `public inline `[`FRH_DiagnosticReportOptions`](#structFRH__DiagnosticReportOptions_1acefb18f18b91ec97ed54c1867116a1ae)`()`

Default constructor, defaults to everything enabled


#### `public inline `[`FRH_DiagnosticReportOptions`](#structFRH__DiagnosticReportOptions_1a19bb2c3d86a3a1b362865d8d6113f584)`(`[`DiagnosticReportPreset`](Diagnostics.md#structFRH__DiagnosticReportOptions_1aead5a36dfae81a332c860b913bce9b98)` Preset)`

Preset constructor, for ease of use


#### `enum `[`DiagnosticReportPreset`](#structFRH__DiagnosticReportOptions_1aead5a36dfae81a332c860b913bce9b98)
ValuesDescriptions
AllEnabledEnable all options
AllDisabledDisable all options

Preset for enabling/disabling various diagnostic report options