mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 10:19:02 +00:00
report profiles info event (#194055)
This commit is contained in:
committed by
GitHub
parent
8df7e6dc53
commit
35a34cd1f3
@@ -158,6 +158,8 @@ class SharedProcessMain extends Disposable implements IClientConnectionFilter {
|
|||||||
|
|
||||||
instantiationService.invokeFunction(accessor => {
|
instantiationService.invokeFunction(accessor => {
|
||||||
const logService = accessor.get(ILogService);
|
const logService = accessor.get(ILogService);
|
||||||
|
const telemetryService = accessor.get(ITelemetryService);
|
||||||
|
const userDataProfilesService = accessor.get(IUserDataProfilesService);
|
||||||
|
|
||||||
// Log info
|
// Log info
|
||||||
logService.trace('sharedProcess configuration', JSON.stringify(this.configuration));
|
logService.trace('sharedProcess configuration', JSON.stringify(this.configuration));
|
||||||
@@ -167,6 +169,10 @@ class SharedProcessMain extends Disposable implements IClientConnectionFilter {
|
|||||||
|
|
||||||
// Error handler
|
// Error handler
|
||||||
this.registerErrorHandler(logService);
|
this.registerErrorHandler(logService);
|
||||||
|
|
||||||
|
// Report Profiles Info
|
||||||
|
this.reportProfilesInfo(telemetryService, userDataProfilesService);
|
||||||
|
this._register(userDataProfilesService.onDidChangeProfiles(() => this.reportProfilesInfo(telemetryService, userDataProfilesService)));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Instantiate Contributions
|
// Instantiate Contributions
|
||||||
@@ -444,6 +450,20 @@ class SharedProcessMain extends Disposable implements IClientConnectionFilter {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private reportProfilesInfo(telemetryService: ITelemetryService, userDataProfilesService: IUserDataProfilesService): void {
|
||||||
|
type ProfilesInfoClassification = {
|
||||||
|
owner: 'sandy081';
|
||||||
|
comment: 'Report profiles information';
|
||||||
|
count: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Number of profiles' };
|
||||||
|
};
|
||||||
|
type ProfilesInfoEvent = {
|
||||||
|
count: number;
|
||||||
|
};
|
||||||
|
telemetryService.publicLog2<ProfilesInfoEvent, ProfilesInfoClassification>('profilesInfo', {
|
||||||
|
count: userDataProfilesService.profiles.length
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
handledClientConnection(e: MessageEvent): boolean {
|
handledClientConnection(e: MessageEvent): boolean {
|
||||||
|
|
||||||
// This filter on message port messages will look for
|
// This filter on message port messages will look for
|
||||||
|
|||||||
Reference in New Issue
Block a user