Skip to content

Commit e38edc4

Browse files
authored
Merge pull request #241508 from mjbvz/regulatory-haddock
Remove no longer needed logging
2 parents 8874a60 + ee5f988 commit e38edc4

File tree

4 files changed

+8
-68
lines changed

4 files changed

+8
-68
lines changed

Diff for: src/vs/workbench/api/browser/mainThreadWebviewPanels.ts

+2-18
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ import { URI } from '../../../base/common/uri.js';
1010
import { generateUuid } from '../../../base/common/uuid.js';
1111
import { IConfigurationService } from '../../../platform/configuration/common/configuration.js';
1212
import { IStorageService } from '../../../platform/storage/common/storage.js';
13-
import { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';
14-
import { MainThreadWebviews, reviveWebviewContentOptions, reviveWebviewExtension } from './mainThreadWebviews.js';
15-
import * as extHostProtocol from '../common/extHost.protocol.js';
1613
import { DiffEditorInput } from '../../common/editor/diffEditorInput.js';
1714
import { EditorInput } from '../../common/editor/editorInput.js';
1815
import { ExtensionKeyedWebviewOriginStore, WebviewOptions } from '../../contrib/webview/browser/webview.js';
@@ -24,6 +21,8 @@ import { GroupLocation, GroupsOrder, IEditorGroup, IEditorGroupsService, preferr
2421
import { ACTIVE_GROUP, IEditorService, PreferredGroup, SIDE_GROUP } from '../../services/editor/common/editorService.js';
2522
import { IExtensionService } from '../../services/extensions/common/extensions.js';
2623
import { IExtHostContext } from '../../services/extensions/common/extHostCustomers.js';
24+
import * as extHostProtocol from '../common/extHost.protocol.js';
25+
import { MainThreadWebviews, reviveWebviewContentOptions, reviveWebviewExtension } from './mainThreadWebviews.js';
2726

2827
/**
2928
* Bi-directional map between webview handles and inputs.
@@ -98,7 +97,6 @@ export class MainThreadWebviewPanels extends Disposable implements extHostProtoc
9897
@IEditorService private readonly _editorService: IEditorService,
9998
@IExtensionService extensionService: IExtensionService,
10099
@IStorageService storageService: IStorageService,
101-
@ITelemetryService private readonly _telemetryService: ITelemetryService,
102100
@IWebviewWorkbenchService private readonly _webviewWorkbenchService: IWebviewWorkbenchService,
103101
) {
104102
super();
@@ -174,20 +172,6 @@ export class MainThreadWebviewPanels extends Disposable implements extHostProtoc
174172
}, this.webviewPanelViewType.fromExternal(viewType), initData.title, mainThreadShowOptions);
175173

176174
this.addWebviewInput(handle, webview, { serializeBuffersForPostMessage: initData.serializeBuffersForPostMessage });
177-
178-
const payload = {
179-
extensionId: extension.id.value,
180-
viewType
181-
} as const;
182-
183-
type Classification = {
184-
extensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Id of the extension that created the webview panel' };
185-
viewType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Id of the webview' };
186-
owner: 'mjbvz';
187-
comment: 'Triggered when a webview is created. Records the type of webview and the extension which created it';
188-
};
189-
190-
this._telemetryService.publicLog2<typeof payload, Classification>('webviews:createWebviewPanel', payload);
191175
}
192176

193177
public $disposeWebview(handle: extHostProtocol.WebviewHandle): void {

Diff for: src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.ts

-28
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import * as dom from '../../../../base/browser/dom.js';
77
import { StandardMouseEvent } from '../../../../base/browser/mouseEvent.js';
88
import { getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js';
99
import { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';
10-
import { Lazy } from '../../../../base/common/lazy.js';
1110
import { Disposable } from '../../../../base/common/lifecycle.js';
1211
import { URI } from '../../../../base/common/uri.js';
13-
import { generateUuid } from '../../../../base/common/uuid.js';
1412
import { ICodeEditorService } from '../../../../editor/browser/services/codeEditorService.js';
1513
import { IRange } from '../../../../editor/common/core/range.js';
1614
import { EditorContextKeys } from '../../../../editor/common/editorContextKeys.js';
@@ -92,8 +90,6 @@ export class InlineAnchorWidget extends Disposable {
9290
const contextKeyService = this._register(originalContextKeyService.createScoped(element));
9391
this._chatResourceContext = chatAttachmentResourceContextKey.bindTo(contextKeyService);
9492

95-
const anchorId = new Lazy(generateUuid);
96-
9793
element.classList.add(InlineAnchorWidget.className, 'show-file-icons');
9894

9995
let iconText: string;
@@ -109,18 +105,6 @@ export class InlineAnchorWidget extends Disposable {
109105
iconText = this.data.symbol.name;
110106
iconClasses = ['codicon', ...getIconClasses(modelService, languageService, undefined, undefined, SymbolKinds.toIcon(symbol.kind))];
111107

112-
this._register(dom.addDisposableListener(element, 'click', () => {
113-
telemetryService.publicLog2<{
114-
anchorId: string;
115-
}, {
116-
anchorId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Unique identifier for the current anchor.' };
117-
owner: 'mjbvz';
118-
comment: 'Provides insight into the usage of Chat features.';
119-
}>('chat.inlineAnchor.openSymbol', {
120-
anchorId: anchorId.value
121-
});
122-
}));
123-
124108
this._store.add(instantiationService.invokeFunction(accessor => hookUpSymbolAttachmentDragAndContextMenu(accessor, element, contextKeyService, { value: symbol.location, name: symbol.name, kind: symbol.kind }, MenuId.ChatInlineSymbolAnchorContext)));
125109
} else {
126110
location = this.data;
@@ -156,18 +140,6 @@ export class InlineAnchorWidget extends Disposable {
156140
})
157141
.catch(() => { });
158142

159-
this._register(dom.addDisposableListener(element, 'click', () => {
160-
telemetryService.publicLog2<{
161-
anchorId: string;
162-
}, {
163-
anchorId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Unique identifier for the current anchor.' };
164-
owner: 'mjbvz';
165-
comment: 'Provides insight into the usage of Chat features.';
166-
}>('chat.inlineAnchor.openResource', {
167-
anchorId: anchorId.value
168-
});
169-
}));
170-
171143
// Context menu
172144
this._register(dom.addDisposableListener(element, dom.EventType.CONTEXT_MENU, async domEvent => {
173145
const event = new StandardMouseEvent(dom.getWindow(domEvent), domEvent);

Diff for: src/vs/workbench/contrib/webview/browser/webviewElement.ts

+4-18
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
import { isFirefox } from '../../../../base/browser/browser.js';
77
import { addDisposableListener, EventType, getWindowById } from '../../../../base/browser/dom.js';
8+
import { parentOriginHash } from '../../../../base/browser/iframe.js';
89
import { IMouseWheelEvent } from '../../../../base/browser/mouseEvent.js';
10+
import { CodeWindow } from '../../../../base/browser/window.js';
911
import { promiseWithResolvers, ThrottledDelayer } from '../../../../base/common/async.js';
1012
import { streamToBuffer, VSBufferReadableStream } from '../../../../base/common/buffer.js';
1113
import { CancellationTokenSource } from '../../../../base/common/cancellation.js';
@@ -26,18 +28,15 @@ import { IInstantiationService } from '../../../../platform/instantiation/common
2628
import { ILogService } from '../../../../platform/log/common/log.js';
2729
import { INotificationService } from '../../../../platform/notification/common/notification.js';
2830
import { IRemoteAuthorityResolverService } from '../../../../platform/remote/common/remoteAuthorityResolver.js';
29-
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
3031
import { ITunnelService } from '../../../../platform/tunnel/common/tunnel.js';
3132
import { WebviewPortMappingManager } from '../../../../platform/webview/common/webviewPortMapping.js';
32-
import { parentOriginHash } from '../../../../base/browser/iframe.js';
33+
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
34+
import { decodeAuthority, webviewGenericCspSource, webviewRootResourceAuthority } from '../common/webview.js';
3335
import { loadLocalResource, WebviewResourceResponse } from './resourceLoading.js';
3436
import { WebviewThemeDataProvider } from './themeing.js';
3537
import { areWebviewContentOptionsEqual, IWebview, WebviewContentOptions, WebviewExtensionDescription, WebviewInitInfo, WebviewMessageReceivedEvent, WebviewOptions } from './webview.js';
3638
import { WebviewFindDelegate, WebviewFindWidget } from './webviewFindWidget.js';
3739
import { FromWebviewMessage, KeyEvent, ToWebviewMessage, WebViewDragEvent } from './webviewMessages.js';
38-
import { decodeAuthority, webviewGenericCspSource, webviewRootResourceAuthority } from '../common/webview.js';
39-
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
40-
import { CodeWindow } from '../../../../base/browser/window.js';
4140

4241
interface WebviewContent {
4342
readonly html: string;
@@ -158,7 +157,6 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
158157
@IFileService private readonly _fileService: IFileService,
159158
@ILogService private readonly _logService: ILogService,
160159
@IRemoteAuthorityResolverService private readonly _remoteAuthorityResolverService: IRemoteAuthorityResolverService,
161-
@ITelemetryService private readonly _telemetryService: ITelemetryService,
162160
@ITunnelService private readonly _tunnelService: ITunnelService,
163161
@IInstantiationService instantiationService: IInstantiationService,
164162
@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,
@@ -588,18 +586,6 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
588586
if (this._environmentService.isExtensionDevelopment) {
589587
this._onMissingCsp.fire(this.extension.id);
590588
}
591-
592-
const payload = {
593-
extension: this.extension.id.value
594-
} as const;
595-
596-
type Classification = {
597-
extension: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The id of the extension that created the webview.' };
598-
owner: 'mjbvz';
599-
comment: 'Helps find which extensions are contributing webviews with invalid CSPs';
600-
};
601-
602-
this._telemetryService.publicLog2<typeof payload, Classification>('webviewMissingCsp', payload);
603589
}
604590
}
605591

Diff for: src/vs/workbench/contrib/webview/electron-sandbox/webviewElement.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ import { ILogService } from '../../../../platform/log/common/log.js';
1818
import { INativeHostService } from '../../../../platform/native/common/native.js';
1919
import { INotificationService } from '../../../../platform/notification/common/notification.js';
2020
import { IRemoteAuthorityResolverService } from '../../../../platform/remote/common/remoteAuthorityResolver.js';
21-
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
2221
import { ITunnelService } from '../../../../platform/tunnel/common/tunnel.js';
2322
import { FindInFrameOptions, IWebviewManagerService } from '../../../../platform/webview/common/webviewManagerService.js';
23+
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
2424
import { WebviewThemeDataProvider } from '../browser/themeing.js';
2525
import { WebviewInitInfo } from '../browser/webview.js';
2626
import { WebviewElement } from '../browser/webviewElement.js';
2727
import { WindowIgnoreMenuShortcutsManager } from './windowIgnoreMenuShortcutsManager.js';
28-
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
2928

3029
/**
3130
* Webview backed by an iframe but that uses Electron APIs to power the webview.
@@ -48,7 +47,6 @@ export class ElectronWebviewElement extends WebviewElement {
4847
@IContextMenuService contextMenuService: IContextMenuService,
4948
@ITunnelService tunnelService: ITunnelService,
5049
@IFileService fileService: IFileService,
51-
@ITelemetryService telemetryService: ITelemetryService,
5250
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
5351
@IRemoteAuthorityResolverService remoteAuthorityResolverService: IRemoteAuthorityResolverService,
5452
@ILogService logService: ILogService,
@@ -61,7 +59,7 @@ export class ElectronWebviewElement extends WebviewElement {
6159
) {
6260
super(initInfo, webviewThemeDataProvider,
6361
configurationService, contextMenuService, notificationService, environmentService,
64-
fileService, logService, remoteAuthorityResolverService, telemetryService, tunnelService, instantiationService, accessibilityService);
62+
fileService, logService, remoteAuthorityResolverService, tunnelService, instantiationService, accessibilityService);
6563

6664
this._webviewKeyboardHandler = new WindowIgnoreMenuShortcutsManager(configurationService, mainProcessService, _nativeHostService);
6765

0 commit comments

Comments
 (0)