DiagnosticsAPI
Defined in: diagnostics/Diagnostics.ts:68
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DiagnosticsAPI(
options?):DiagnosticsAPI
Defined in: diagnostics/Diagnostics.ts:80
Parameters
Section titled “Parameters”options?
Section titled “options?”DiagnosticsOptions = {}
Returns
Section titled “Returns”DiagnosticsAPI
Accessors
Section titled “Accessors”dropped
Section titled “dropped”Get Signature
Section titled “Get Signature”get dropped():
number
Defined in: diagnostics/Diagnostics.ts:141
New problems that were not tracked because DiagnosticsOptions.maxDistinct was reached. A non-zero value here means the report is incomplete, and a sink should say so rather than let it read as the whole picture.
Returns
Section titled “Returns”number
events
Section titled “events”Get Signature
Section titled “Get Signature”get events(): readonly
DiagnosticEvent[]
Defined in: diagnostics/Diagnostics.ts:134
The distinct problems seen since the last flush, oldest first.
Returns
Section titled “Returns”readonly DiagnosticEvent[]
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
void
Defined in: diagnostics/Diagnostics.ts:181
Drop everything without sending.
Returns
Section titled “Returns”void
flush()
Section titled “flush()”flush():
void
Defined in: diagnostics/Diagnostics.ts:153
Hand everything accumulated to the sink and start a new window.
Clears even when there is no sink: the alternative is a game that never installs one accumulating counts forever, and a count since boot is not what the API promises. What survives with no sink is the aggregation, not an unbounded history.
Returns
Section titled “Returns”void
report()
Section titled “report()”report(
report):void
Defined in: diagnostics/Diagnostics.ts:96
Report a problem. Repeats of one already seen increment its count.
Parameters
Section titled “Parameters”report
Section titled “report”Returns
Section titled “Returns”void
reportError()
Section titled “reportError()”reportError(
kind,error,source?):void
Defined in: diagnostics/Diagnostics.ts:129
Report something thrown, taking the message and stack off it.
Parameters
Section titled “Parameters”unknown
source?
Section titled “source?”string
Returns
Section titled “Returns”void
setSink()
Section titled “setSink()”setSink(
sink):void
Defined in: diagnostics/Diagnostics.ts:90
Install where diagnostics go, or null to stop sending (events still
aggregate locally). Installing a sink hands it whatever has already
accumulated — a game that installs one after boot does not lose the boot.
Parameters
Section titled “Parameters”DiagnosticsSink | null
Returns
Section titled “Returns”void
tick()
Section titled “tick()”tick(
deltaSeconds):void
Defined in: diagnostics/Diagnostics.ts:174
Advance the flush clock. Driven by the plugin’s system, not a timer — a background tab or a suspended mini-game should not be flushing.
Parameters
Section titled “Parameters”deltaSeconds
Section titled “deltaSeconds”number
Returns
Section titled “Returns”void