Menu
Lumberyard
User Guide (Version 1.15)

Defect Reporter EBus Interfaces

The Defect Reporter cloud gem includes the following EBus interfaces.

For the source code, see the lumberyard_version\dev\Gems\CloudGemDefectReporter\vN\Code\Include\CloudGemDefectReporter\CloudGemDefectReporterBus.h file.

CloudGemDefectReporterRequestBus

Contains request EBus methods for the defect reporter gem.

AddAnnotation

Adds an annotation to a defect report.

Available for scripting: Yes

Syntax

void AddAnnotation(int reportID, AZStd::string annotation)

Parameter Type Description
reportID int ID of the report to which the annotation is added.
annotation AZStd::string Comments that the user submitted for the report.

AddCustomField

Adds a custom data collection field to a report in the form of a key-value pair.

Available for scripting: Yes

Syntax

void AddCustomField(int reportID, AZStd::string key, AZStd::string value)

Parameter Type Description
reportID int ID of the report.
key AZStd::string Key for the custom field.
value AZStd::string Value for the custom field.

FlushReports

Removes all reports from the report queue.

Available for scripting: Yes

Syntax

void FlushReports()

GetAvailableReportIDs

Gets a list of the IDs of the currently available reports. The available reports are the set of reports whose information gathering has been completed. Before the main thread is called, call QueueBroadcast to ensure that you have the state in which all reports have been resolved.

Available for scripting: Yes

Syntax

AZStd::vector<int> GetAvailableReportIDs()

GetClientConfiguration

Gets the custom user-created report fields from the Cloud Gem Portal.

Available for scripting: Yes

Syntax

void GetClientConfiguration()

GetHandlerID

Returns a unique handler ID for a handler and registers the intention of the handler to report data at some point.

Note

GetHandlerID must be called before ReportData. Because ordering issues can occur if GetHandlerID is queued, GetHandlerID should be called in the main thread.

Available for scripting: Yes

Syntax

int GetHandlerID(int reportID)

Parameter Type Description
reportID int ID of the report to which this data belongs. The report ID is passed in from CollectDefectReporterData.

GetInputRecord

Gets the input record of a specific event.

Available for scripting: Yes

Syntax

AZStd::string GetInputRecord(AZStd::string processedEventName)

Parameter Type Description
processedEventName AZStd::string Specifies the name of the processed event that corresponds to the record to retrieve.

GetReport

Returns the report that has the specified report ID.

Available for scripting: Yes

Syntax

DefectReport GetReport(int reportID)

Parameter Type Description
reportID int ID of the report to return.

IsSubmittingReport

Disables keyboard input for actions (like game navigation for the keys A, W, S, and D) when a user enters an annotation.

Available for scripting: Yes

Syntax

void IsSubmittingReport(bool status)

Parameter Type Description
status bool Specify true to disable keyboard input; otherwise, false.

PostReports

Uploads the reports and attachments in the specified list. This method is typically called by the UI to post the reports that the user edited.

Available for scripting: Yes

Syntax

void PostReports(AZStd::vector<int> reportIDs)

Parameter Type Description
reportIDs AZStd::vector<int> List of the IDs of the reports to post.

RemoveReport

Removes the specified report. This method is typically called by the UI to remove a queued report.

Available for scripting: Yes

Syntax

void RemoveReport(int reportID)

Parameter Type Description
reportID int ID of the report to remove.

ReportData

Called by a handler when it has gathered the requested data and is ready to add the data to the report.

Note

You must call QueueBroadcast to queue ReportData. Because reports come from different threads, ordering issues can arise if ReportData is not queued.

Available for scripting: Yes

Syntax

void ReportData(int reportID, int handlerID, vector<MetricDesc> metricsData, vector<AttachmentDesc> attachmentPaths)

Parameter Type Description
reportID int Report ID for this data.
handlerID int ID of the handler returned by GetHandlerID.
metrics vector<MetricDesc>

A MetricDesc object that contains the metrics attributes for the report.

For details, see MetricDesc.

attachments vector<AttachmentDesc>

An AttachmentDesc object that contains descriptions (names, local paths and mime types) of the attachments to be sent with the report.

For details, see AttachmentDesc.

MetricDesc

Parameter Type Description
m_key string Unique key for the data returned.
m_data string JSON string that contains the metrics data that you specify.

AttachmentDesc

Parameter Type Description
m_name string Friendly name of the attachment.
m_type string MIME type of the attachment. For an official list of MIME types, see Media Types.
m_path string Local path of the attachment.

TriggerDefectReport

Triggers data gathering from handlers for a defect report. This is the code entry point for the defect reporter.

Available for scripting: Yes

Syntax

void TriggerDefectReport(bool immediate)

Parameter Type Description
immediate bool True if the report dialog shows immediately; false if the report data is queued for later annotation.

TriggerUserReportEditing

Requests that the defect reporter UI be displayed so that the user can edit and annotate the current report queue.

Available for scripting: Yes

Syntax

void TriggerUserReportEditing()

UpdateReport

Sends an updated version of a defect report to the report queue. UpdateReport is typically called by the UI but can be called by other code if required (for example, for automation purposes).

Available for scripting: Yes

Syntax

void UpdateReport(DefectReport report)

Parameter Type Description
report DefectReport

Report to send to the report queue.

A DefectReport object is a data structure that contains all the information required to create a defect report. DefectReport objects are typically generated and maintained by the defect reporter. However, DefectReport objects are also passed to the UI for display and editing before they are sent back to the defect reporter.

CloudGemDefectReporterNotificationBus

Connect to the CloudGemDefectReporterNotificationBus to handle defect reporting.

OnCollectDefectReporterData

Called when the handler is requested to start collecting defect data and report it to the defect reporter. For more information, see Defect Reporter and Handler Workflow.

Available for scripting: Yes

Syntax

void OnCollectDefectReporterData(int reportID)

OnDefectReportUploaded

Called when the report has been uploaded so that the handler (CloudGemDefectReporterNotificationBehaviorHandler) can clean up report artifacts.

Available for scripting: Yes

Syntax

void OnDefectReportUploaded(int reportID)

CloudGemDefectReporterUINotificationBus

UI handler EBus for processing UI requests from the defect reporter. This EBus abstracts the defect reporter from the UI so that you can supply your own implementation.

OnClientConfigurationAvailable

Called when the custom client configuration is available.

Available for scripting: Yes

Syntax

virtual void OnClientConfigurationAvailable(const ServiceAPI::ClientConfiguration& clientConfiguration) {}

OnOpenDefectReportEditorUI

Requests that a custom user interface open for report editing and annotation.

Available for scripting: Yes

Syntax

void OnOpenDefectReportEditorUI(vector<DefectReport> reports)

OnDefectReportPostStatus

Called when a new defect report is posted.

Available for scripting: Yes

Syntax

void OnDefectReportPostStatus(int currentReport, int totalReports)

OnDefectReportPostError

Called when an error occurs during the POST operation.

Available for scripting: Yes

Syntax

void OnDefectReportPostError(string error)

OnNewReportTriggered

Called when the user initiates a report.

Available for scripting: Yes

Syntax

virtual void OnNewReportTriggered() {}

OnNewReportReady

Called when all the information in a report has been gathered.

Available for scripting: Yes

Syntax

virtual void OnNewReportReady() {}

OnReachSoftCap

Called when one of the following configured limits is reached:

  • The maximum number of presigned posts that can be requested per call (default: 20).

  • The maximum number of presigned post calls that can be requested (default: 1).

These limitations help prevent the excessive use of memory. To change the limits, you can edit the following two files:

  • lumberyard_version\dev\Gems\CloudGemDefectReporter\vN\AWS\common-code\Constant\defect_reporter_constants.py

  • lumberyard_version\dev\Gems\CloudGemDefectReporter\vN\Code\Include\CloudGemDefectReporter\DefectReporterDataStructures.h

Available for scripting: Yes

Syntax

virtual void OnReachSoftCap() { }

OnReportsUpdated

Called when the number of reports changes. This can happen when a report is created, deleted, or submitted. The UI updates to show the number of reports that are available or in process.

Available for scripting: Yes

Syntax

virtual void OnReportsUpdated(int totalAvailableReports, int totalPending) {}

OnSubmittingReport

Called when the keyboard input is enabled or disabled.

Available for scripting: Yes

Syntax

virtual void OnSubmittingReport(const bool& status) {}