Skip to content

Commit ab19f0c

Browse files
authored
Update BlazorDebugger telemetry report event (#2158)
1 parent 91ccbe5 commit ab19f0c

5 files changed

Lines changed: 21 additions & 20 deletions

File tree

src/binder.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,11 @@ export class Binder implements IDisposable {
458458
telemetryReporter: ITelemetryReporter,
459459
isVsCode?: boolean,
460460
) {
461-
cdp.DotnetDebugger.on('reportBlazorDebugError', event => {
462-
telemetryReporter.report('blazorDebugError', {
461+
cdp.DotnetDebugger.on('reportBlazorDebugException', event => {
462+
telemetryReporter.report('blazorDebugException', {
463463
exceptionType: event.exceptionType,
464-
'!error': event.error,
465-
error: isVsCode ? undefined : event.error,
464+
'!error': event.exception,
465+
error: isVsCode ? undefined : event.exception,
466466
});
467467
});
468468
}

src/build/wasmCustom.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ export default {
6262
],
6363
events: [
6464
{
65-
name: 'reportBlazorDebugError',
65+
name: 'reportBlazorDebugException',
6666
description:
67-
'Fired when the attached Blazor DotnetDebugger itself, not the blazor app being debugged, encounters an error.',
67+
'Fired when the attached Blazor DotnetDebugger itself, not the blazor app being debugged, reports an exception.',
6868
parameters: [
6969
{
7070
name: 'exceptionType',
@@ -73,8 +73,9 @@ export default {
7373
enum: ['uncaughtException', 'unhandledRejection'],
7474
},
7575
{
76-
name: 'error',
77-
description: 'The error message.',
76+
name: 'exception',
77+
description:
78+
'Location in Blazor DotnetDebugger logic that is reporting the exception.',
7879
type: 'string',
7980
enum: ['unknown', 'undefined'],
8081
},

src/cdp/api.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11632,11 +11632,11 @@ export namespace Cdp {
1163211632
): Promise<DotnetDebugger.SetSymbolOptionsResult | undefined>;
1163311633

1163411634
/**
11635-
* Fired when the attached Blazor DotnetDebugger itself, not the blazor app being debugged, encounters an error.
11635+
* Fired when the attached Blazor DotnetDebugger itself, not the blazor app being debugged, reports an exception.
1163611636
*/
1163711637
on(
11638-
event: 'reportBlazorDebugError',
11639-
listener: (event: DotnetDebugger.ReportBlazorDebugErrorEvent) => void,
11638+
event: 'reportBlazorDebugException',
11639+
listener: (event: DotnetDebugger.ReportBlazorDebugExceptionEvent) => void,
1164011640
): IDisposable;
1164111641
}
1164211642

@@ -11685,18 +11685,18 @@ export namespace Cdp {
1168511685
}
1168611686

1168711687
/**
11688-
* Parameters of the 'DotnetDebugger.reportBlazorDebugError' event.
11688+
* Parameters of the 'DotnetDebugger.reportBlazorDebugException' event.
1168911689
*/
11690-
export interface ReportBlazorDebugErrorEvent {
11690+
export interface ReportBlazorDebugExceptionEvent {
1169111691
/**
1169211692
* Specifies the type of exception.
1169311693
*/
1169411694
exceptionType: 'uncaughtException' | 'unhandledRejection';
1169511695

1169611696
/**
11697-
* The error message.
11697+
* Location in Blazor DotnetDebugger logic that is reporting the exception.
1169811698
*/
11699-
error: 'unknown' | 'undefined';
11699+
exception: 'unknown' | 'undefined';
1170011700
}
1170111701

1170211702
/**

src/cdp/telemetryClassification.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,11 @@ interface ICDPOperationClassification {
357357
};
358358

359359
// Domain: DotnetDebugger
360-
'dotnetdebugger.reportblazordebugerror': {
360+
'dotnetdebugger.reportblazordebugexception': {
361361
classification: 'SystemMetaData';
362362
purpose: 'PerformanceAndHealth';
363363
};
364-
'!dotnetdebugger.reportblazordebugerror.errors': {
364+
'!dotnetdebugger.reportblazordebugexception.errors': {
365365
classification: 'CallstackOrException';
366366
purpose: 'PerformanceAndHealth';
367367
};

src/telemetry/classification.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ export const createLoggers = (sendEvent: (event: Dap.OutputEventParams) => void)
220220
{ ...globalMetrics, ...metrics },
221221
);
222222

223-
const blazorDebugError = (metrics: IErrorMetrics) =>
223+
const blazorDebugException = (metrics: IErrorMetrics) =>
224224
publicLog2<IGlobalMetrics & IErrorMetrics, IErrorClassification & IGlobalClassification>(
225-
'blazor-debug/blazorDebugError',
225+
'blazor-debug/blazorDebugException',
226226
{ ...globalMetrics, ...metrics },
227227
);
228228

@@ -299,7 +299,7 @@ export const createLoggers = (sendEvent: (event: Dap.OutputEventParams) => void)
299299
nodeRuntime,
300300
diagnosticPrompt,
301301
setGlobalMetric,
302-
blazorDebugError,
302+
blazorDebugException,
303303
};
304304
};
305305

0 commit comments

Comments
 (0)