Skip to content

Commit 8512ce3

Browse files
authored
Extend unresponsive extension host instrumentation (microsoft#158320)
* Extend unresponsive extension host instrumentation * Adding id constraint * Add expiration
1 parent bf51460 commit 8512ce3

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,19 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont
158158
type UnresponsiveData = {
159159
duration: number;
160160
data: NamedSlice[];
161+
id: string;
161162
};
162163
type UnresponsiveDataClassification = {
163164
owner: 'jrieken';
164165
comment: 'Profiling data that was collected while the extension host was unresponsive';
165166
duration: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'Duration for which the extension host was unresponsive' };
166-
data: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'Extensions ids and core parts that were active while the extension host was froozen' };
167+
data: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'Extensions ids and core parts that were active while the extension host was frozen' };
168+
id: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'Top extensions id that took most of the duration' };
167169
};
168170
this._telemetryService.publicLog2<UnresponsiveData, UnresponsiveDataClassification>('exthostunresponsive', {
169171
duration,
170172
data,
173+
id: ExtensionIdentifier.toKey(extension.identifier),
171174
});
172175

173176
// add to running extensions view
@@ -191,6 +194,19 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont
191194
}
192195
this._blame.add(ExtensionIdentifier.toKey(extension.identifier));
193196

197+
type UnresponsivePromptData = {
198+
id: string;
199+
};
200+
type UnresponsivePromptDataClassification = {
201+
owner: 'digitarald';
202+
comment: 'Users got a warning about an extension hanging the extension process';
203+
expiration: '1.73';
204+
id: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'Extension id that froze the extension process' };
205+
};
206+
this._telemetryService.publicLog2<UnresponsivePromptData, UnresponsivePromptDataClassification>('exthostunresponsiveprompt', {
207+
id: ExtensionIdentifier.toKey(extension.identifier),
208+
});
209+
194210
// user-facing message when very bad...
195211
this._notificationService.prompt(
196212
Severity.Warning,

0 commit comments

Comments
 (0)