Initial first run of telemetry output API (#157807)

* Initial first run of telemetry output API

* Add proposed api check
This commit is contained in:
Logan Ramos
2022-08-10 13:26:12 -04:00
committed by GitHub
parent f6a746fc46
commit dbbf24add8
14 changed files with 91 additions and 5 deletions

View File

@@ -93,6 +93,7 @@ import { combinedDisposable } from 'vs/base/common/lifecycle';
import { checkProposedApiEnabled, ExtensionIdentifierSet, isProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions';
import { DebugConfigurationProviderTriggerKind } from 'vs/workbench/contrib/debug/common/debug';
import { equalsIgnoreCase } from 'vs/base/common/strings';
import { IExtHostTelemetryLogService } from 'vs/workbench/api/common/extHostTelemetryLogService';
export interface IExtensionRegistries {
mine: ExtensionDescriptionRegistry;
@@ -123,6 +124,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
const extHostLoggerService = accessor.get(ILoggerService);
const extHostLogService = accessor.get(ILogService);
const extHostTunnelService = accessor.get(IExtHostTunnelService);
const extHostTelemetryLogService = accessor.get(IExtHostTelemetryLogService);
const extHostApiDeprecation = accessor.get(IExtHostApiDeprecationService);
const extHostWindow = accessor.get(IExtHostWindow);
const extHostSecretState = accessor.get(IExtHostSecretState);
@@ -795,6 +797,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
get tabGroups(): vscode.TabGroups {
return extHostEditorTabs.tabGroups;
},
logTelemetryToOutputChannel(eventName: string, data: Record<string, any>): void {
checkProposedApiEnabled(extension, 'telemetryLog');
extHostTelemetryLogService.logToTelemetryOutputChannel(extension, eventName, data);
}
};
// namespace: workspace