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`](#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 > `[`Errors`](#classFRH__DiagnosticReportGenerator_1ada789baed6e1b4cbee42e660173ac21e)

Errors 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 `[`GenerateErrorsData`](#classFRH__DiagnosticReportGenerator_1ae6ac21c2a52c8682002830688ee5fb3c)`()`

Generates the Errors 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
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`](undefined.md#structFRH__Diagnostics_1_1FNetworkFailure)` > `[`NetworkFailures`](#classFRH__Diagnostics_1aa3326ec15023e33267552c8fdd1d7242)
#### `public TArray< `[`FTravelFailure`](undefined.md#structFRH__Diagnostics_1_1FTravelFailure)` > `[`TravelFailures`](#classFRH__Diagnostics_1a4e54a510a46cece420be1c2aab1e176b)
#### `public `[`FRH_Diagnostics`](#classFRH__Diagnostics_1ad3d045b72c14e877b003ee8c7e8d66da)`()`
#### `public virtual `[`~FRH_Diagnostics`](#classFRH__Diagnostics_1ad6ce8e6bec06da07ba6a46555c836599)`() = default`
#### `public virtual void `[`Initialize`](#classFRH__Diagnostics_1a733ca2202b121d71016d27d7f1c6893e)`()`

Initialize the system.


#### `public virtual void `[`Uninitialize`](#classFRH__Diagnostics_1a95b657028e5d8e7be429235794e589f2)`()`

Safely tears down the system.


#### `public inline virtual void `[`ClearCache`](#classFRH__Diagnostics_1a702aef12b2e52aa51157482710262b11)`()`

Clears the diagnostics cache.


#### `public virtual void `[`GenerateReport`](#classFRH__Diagnostics_1a338354d93d95481658c5e265bb864fcd)`(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


#### `public inline virtual void `[`OnNetworkFailure`](#classFRH__Diagnostics_1a6ed138b2ee30fd4f3a8e83a4acf819c5)`(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`](#classFRH__Diagnostics_1a23b83f0976297684bc0b553c0cccaf22)`(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`](undefined.md#structFRHAPI__JsonObject)` `[`CustomMetadata`](#structFRH__DiagnosticReportOptions_1aa157190317b06bce18f40c25795477f7)

Metadata to include 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 `[`bIncludeErrors`](#structFRH__DiagnosticReportOptions_1a101ac1b25465198a171e84d17ba301c1)

Whether to include errors 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 TWeakPtr< const `[`FRH_Diagnostics`](Diagnostics.md#classFRH__Diagnostics)` > `[`DiagnosticsTracker`](#structFRH__DiagnosticReportOptions_1a334df105d42a7bfd1c5e100d6f579d42)

Diagnostics object to use to pull tracked diagnostics


#### `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