diff --git a/src/binder.ts b/src/binder.ts index f23fc10ca..f46413c4a 100644 --- a/src/binder.ts +++ b/src/binder.ts @@ -458,11 +458,11 @@ export class Binder implements IDisposable { telemetryReporter: ITelemetryReporter, isVsCode?: boolean, ) { - cdp.DotnetDebugger.on('reportBlazorDebugError', event => { - telemetryReporter.report('blazorDebugError', { + cdp.DotnetDebugger.on('reportBlazorDebugException', event => { + telemetryReporter.report('blazorDebugException', { exceptionType: event.exceptionType, - '!error': event.error, - error: isVsCode ? undefined : event.error, + '!error': event.exception, + error: isVsCode ? undefined : event.exception, }); }); } diff --git a/src/build/wasmCustom.ts b/src/build/wasmCustom.ts index 9bb3dafbe..984b48181 100644 --- a/src/build/wasmCustom.ts +++ b/src/build/wasmCustom.ts @@ -62,9 +62,9 @@ export default { ], events: [ { - name: 'reportBlazorDebugError', + name: 'reportBlazorDebugException', description: - 'Fired when the attached Blazor DotnetDebugger itself, not the blazor app being debugged, encounters an error.', + 'Fired when the attached Blazor DotnetDebugger itself, not the blazor app being debugged, reports an exception.', parameters: [ { name: 'exceptionType', @@ -73,8 +73,9 @@ export default { enum: ['uncaughtException', 'unhandledRejection'], }, { - name: 'error', - description: 'The error message.', + name: 'exception', + description: + 'Location in Blazor DotnetDebugger logic that is reporting the exception.', type: 'string', enum: ['unknown', 'undefined'], }, diff --git a/src/cdp/api.d.ts b/src/cdp/api.d.ts index 2db4d591e..218f64bee 100644 --- a/src/cdp/api.d.ts +++ b/src/cdp/api.d.ts @@ -11632,11 +11632,11 @@ export namespace Cdp { ): Promise; /** - * Fired when the attached Blazor DotnetDebugger itself, not the blazor app being debugged, encounters an error. + * Fired when the attached Blazor DotnetDebugger itself, not the blazor app being debugged, reports an exception. */ on( - event: 'reportBlazorDebugError', - listener: (event: DotnetDebugger.ReportBlazorDebugErrorEvent) => void, + event: 'reportBlazorDebugException', + listener: (event: DotnetDebugger.ReportBlazorDebugExceptionEvent) => void, ): IDisposable; } @@ -11685,18 +11685,18 @@ export namespace Cdp { } /** - * Parameters of the 'DotnetDebugger.reportBlazorDebugError' event. + * Parameters of the 'DotnetDebugger.reportBlazorDebugException' event. */ - export interface ReportBlazorDebugErrorEvent { + export interface ReportBlazorDebugExceptionEvent { /** * Specifies the type of exception. */ exceptionType: 'uncaughtException' | 'unhandledRejection'; /** - * The error message. + * Location in Blazor DotnetDebugger logic that is reporting the exception. */ - error: 'unknown' | 'undefined'; + exception: 'unknown' | 'undefined'; } /** diff --git a/src/cdp/telemetryClassification.d.ts b/src/cdp/telemetryClassification.d.ts index 02ecc6624..6da0ab89a 100644 --- a/src/cdp/telemetryClassification.d.ts +++ b/src/cdp/telemetryClassification.d.ts @@ -357,11 +357,11 @@ interface ICDPOperationClassification { }; // Domain: DotnetDebugger - 'dotnetdebugger.reportblazordebugerror': { + 'dotnetdebugger.reportblazordebugexception': { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; }; - '!dotnetdebugger.reportblazordebugerror.errors': { + '!dotnetdebugger.reportblazordebugexception.errors': { classification: 'CallstackOrException'; purpose: 'PerformanceAndHealth'; }; diff --git a/src/telemetry/classification.ts b/src/telemetry/classification.ts index 8bbdec6f9..a67be9a48 100644 --- a/src/telemetry/classification.ts +++ b/src/telemetry/classification.ts @@ -220,9 +220,9 @@ export const createLoggers = (sendEvent: (event: Dap.OutputEventParams) => void) { ...globalMetrics, ...metrics }, ); - const blazorDebugError = (metrics: IErrorMetrics) => + const blazorDebugException = (metrics: IErrorMetrics) => publicLog2( - 'blazor-debug/blazorDebugError', + 'blazor-debug/blazorDebugException', { ...globalMetrics, ...metrics }, ); @@ -299,7 +299,7 @@ export const createLoggers = (sendEvent: (event: Dap.OutputEventParams) => void) nodeRuntime, diagnosticPrompt, setGlobalMetric, - blazorDebugError, + blazorDebugException, }; };