@@ -59,7 +59,7 @@ export abstract class RequireInterceptor {
59
59
const extensionPaths = await this . _extHostExtensionService . getExtensionPathIndex ( ) ;
60
60
61
61
this . register ( new VSCodeNodeModuleFactory ( this . _apiFactory , extensionPaths , this . _extensionRegistry , configProvider , this . _logService ) ) ;
62
- this . register ( this . _instaService . createInstance ( KeytarNodeModuleFactory ) ) ;
62
+ this . register ( this . _instaService . createInstance ( KeytarNodeModuleFactory , extensionPaths ) ) ;
63
63
if ( this . _initData . remote . isRemote ) {
64
64
this . register ( this . _instaService . createInstance ( OpenNodeModuleFactory , extensionPaths , this . _initData . environment . appUriScheme ) ) ;
65
65
}
@@ -140,14 +140,17 @@ interface IKeytarModule {
140
140
class KeytarNodeModuleFactory implements INodeModuleFactory {
141
141
public readonly nodeModuleName : string = 'keytar' ;
142
142
143
+ private readonly _mainThreadTelemetry : MainThreadTelemetryShape ;
143
144
private alternativeNames : Set < string > | undefined ;
144
145
private _impl : IKeytarModule ;
145
146
146
147
constructor (
148
+ private readonly _extensionPaths : TernarySearchTree < URI , IExtensionDescription > ,
147
149
@IExtHostRpcService rpcService : IExtHostRpcService ,
148
150
@IExtHostInitDataService initData : IExtHostInitDataService ,
149
151
150
152
) {
153
+ this . _mainThreadTelemetry = rpcService . getProxy ( MainContext . MainThreadTelemetry ) ;
151
154
const { environment } = initData ;
152
155
const mainThreadKeytar = rpcService . getProxy ( MainContext . MainThreadKeytar ) ;
153
156
@@ -182,7 +185,12 @@ class KeytarNodeModuleFactory implements INodeModuleFactory {
182
185
} ;
183
186
}
184
187
185
- public load ( _request : string , _parent : URI ) : any {
188
+ public load ( _request : string , parent : URI ) : any {
189
+ const ext = this . _extensionPaths . findSubstr ( parent ) ;
190
+ type ShimmingKeytarClassification = {
191
+ extension : { classification : 'SystemMetaData' , purpose : 'FeatureInsight' } ;
192
+ } ;
193
+ this . _mainThreadTelemetry . $publicLog2 < { extension : string } , ShimmingKeytarClassification > ( 'shimming.keytar' , { extension : ext ?. identifier . value ?? 'unknown_extension' } ) ;
186
194
return this . _impl ;
187
195
}
188
196
0 commit comments