@codingame/monaco-vscode-telemetry-service-override 23.2.2 → 24.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -3
- package/vscode/src/vs/platform/telemetry/browser/1dsAppender.d.ts +1 -1
- package/vscode/src/vs/platform/telemetry/common/1dsAppender.d.ts +2 -2
- package/vscode/src/vs/platform/telemetry/common/1dsAppender.js +3 -3
- package/vscode/src/vs/platform/telemetry/common/telemetryLogAppender.d.ts +1 -1
- package/vscode/src/vs/platform/telemetry/common/telemetryLogAppender.js +1 -1
- package/vscode/src/vs/platform/telemetry/common/telemetryService.js +26 -26
- package/vscode/src/vs/workbench/contrib/telemetry/browser/telemetry.contribution.js +8 -1
- package/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-telemetry-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - telemetry service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-api": "23.2.2",
|
|
18
|
+
"@codingame/monaco-vscode-api": "24.1.0",
|
|
20
19
|
"@microsoft/1ds-core-js": "3.2.18",
|
|
21
20
|
"@microsoft/1ds-post-js": "3.2.18"
|
|
22
21
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractOneDataSystemAppender, IAppInsightsCore } from "../common/1dsAppender.js";
|
|
2
2
|
export declare class OneDataSystemWebAppender extends AbstractOneDataSystemAppender {
|
|
3
3
|
constructor(isInternalTelemetry: boolean, eventPrefix: string, defaultData: {
|
|
4
|
-
[key: string]:
|
|
4
|
+
[key: string]: unknown;
|
|
5
5
|
} | null, iKeyOrClientFactory: string | (() => IAppInsightsCore));
|
|
6
6
|
}
|
|
@@ -16,10 +16,10 @@ export declare abstract class AbstractOneDataSystemAppender implements ITelemetr
|
|
|
16
16
|
protected readonly endPointUrl = "https://mobile.events.data.microsoft.com/OneCollector/1.0";
|
|
17
17
|
protected readonly endPointHealthUrl = "https://mobile.events.data.microsoft.com/ping";
|
|
18
18
|
constructor(_isInternalTelemetry: boolean, _eventPrefix: string, _defaultData: {
|
|
19
|
-
[key: string]:
|
|
19
|
+
[key: string]: unknown;
|
|
20
20
|
} | null, iKeyOrClientFactory: string | (() => IAppInsightsCore), // allow factory function for testing
|
|
21
21
|
_xhrOverride?: IXHROverride | undefined);
|
|
22
22
|
private _withAIClient;
|
|
23
|
-
log(eventName: string, data?:
|
|
23
|
+
log(eventName: string, data?: unknown): void;
|
|
24
24
|
flush(): Promise<void>;
|
|
25
25
|
}
|
|
@@ -86,14 +86,14 @@ class AbstractOneDataSystemAppender {
|
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
data = mixin(data, this._defaultData);
|
|
89
|
-
|
|
89
|
+
const validatedData = validateTelemetryData(data);
|
|
90
90
|
const name = this._eventPrefix + '/' + eventName;
|
|
91
91
|
try {
|
|
92
92
|
this._withAIClient((aiClient) => {
|
|
93
|
-
aiClient.pluginVersionString =
|
|
93
|
+
aiClient.pluginVersionString = validatedData?.properties.version ?? 'Unknown';
|
|
94
94
|
aiClient.track({
|
|
95
95
|
name,
|
|
96
|
-
baseData: { name, properties:
|
|
96
|
+
baseData: { name, properties: validatedData?.properties, measurements: validatedData?.measurements }
|
|
97
97
|
});
|
|
98
98
|
});
|
|
99
99
|
}
|
|
@@ -8,5 +8,5 @@ export declare class TelemetryLogAppender extends Disposable implements ITelemet
|
|
|
8
8
|
private readonly logger;
|
|
9
9
|
constructor(prefix: string, remote: boolean, loggerService: ILoggerService, environmentService: IEnvironmentService, productService: IProductService);
|
|
10
10
|
flush(): Promise<void>;
|
|
11
|
-
log(eventName: string, data:
|
|
11
|
+
log(eventName: string, data: unknown): void;
|
|
12
12
|
}
|
|
@@ -20,7 +20,7 @@ let TelemetryLogAppender = class TelemetryLogAppender extends Disposable {
|
|
|
20
20
|
const justLoggingAndNotSending = isLoggingOnly(productService, environmentService);
|
|
21
21
|
const logSuffix = justLoggingAndNotSending ? ' (Not Sent)' : '';
|
|
22
22
|
this.logger = this._register(loggerService.createLogger(id, {
|
|
23
|
-
name: ( localize(
|
|
23
|
+
name: ( localize(2055, "Telemetry{0}", logSuffix)),
|
|
24
24
|
group: TelemetryLogGroup,
|
|
25
25
|
hidden: true
|
|
26
26
|
}));
|
|
@@ -34,7 +34,7 @@ let TelemetryService = class TelemetryService {
|
|
|
34
34
|
this._piiPaths = config.piiPaths || [];
|
|
35
35
|
this._telemetryLevel = TelemetryLevel.USAGE;
|
|
36
36
|
this._sendErrorTelemetry = !!config.sendErrorTelemetry;
|
|
37
|
-
this._cleanupPatterns = [/(vscode-)?file
|
|
37
|
+
this._cleanupPatterns = [/(vscode-)?file:\/\/.*?\/resources\/app\//gi];
|
|
38
38
|
for (const piiPath of this._piiPaths) {
|
|
39
39
|
this._cleanupPatterns.push(( new RegExp(escapeRegExpCharacters(piiPath), 'gi')));
|
|
40
40
|
if (piiPath.indexOf('\\') >= 0) {
|
|
@@ -80,7 +80,7 @@ let TelemetryService = class TelemetryService {
|
|
|
80
80
|
data = mixin(data, this._experimentProperties);
|
|
81
81
|
data = cleanData(data, this._cleanupPatterns);
|
|
82
82
|
data = mixin(data, this._commonProperties);
|
|
83
|
-
this._appenders.forEach(a => a.log(eventName, data));
|
|
83
|
+
this._appenders.forEach(a => a.log(eventName, data ?? {}));
|
|
84
84
|
}
|
|
85
85
|
publicLog(eventName, data) {
|
|
86
86
|
this._log(eventName, TelemetryLevel.USAGE, data);
|
|
@@ -104,30 +104,30 @@ TelemetryService = ( __decorate([
|
|
|
104
104
|
], TelemetryService));
|
|
105
105
|
function getTelemetryLevelSettingDescription() {
|
|
106
106
|
const telemetryText = ( localize(
|
|
107
|
-
|
|
107
|
+
2056,
|
|
108
108
|
"Controls {0} telemetry, first-party extension telemetry, and participating third-party extension telemetry. Some third party extensions might not respect this setting. Consult the specific extension's documentation to be sure. Telemetry helps us better understand how {0} is performing, where improvements need to be made, and how features are being used.",
|
|
109
109
|
product.nameLong
|
|
110
110
|
));
|
|
111
111
|
const externalLinksStatement = !product.privacyStatementUrl ?
|
|
112
112
|
( localize(
|
|
113
|
-
|
|
113
|
+
2057,
|
|
114
114
|
"Read more about the [data we collect]({0}).",
|
|
115
115
|
'https://aka.ms/vscode-telemetry'
|
|
116
116
|
)) :
|
|
117
117
|
( localize(
|
|
118
|
-
|
|
118
|
+
2058,
|
|
119
119
|
"Read more about the [data we collect]({0}) and our [privacy statement]({1}).",
|
|
120
120
|
'https://aka.ms/vscode-telemetry',
|
|
121
121
|
product.privacyStatementUrl
|
|
122
122
|
));
|
|
123
123
|
const restartString = !isWeb ? ( localize(
|
|
124
|
-
|
|
124
|
+
2059,
|
|
125
125
|
'A full restart of the application is necessary for crash reporting changes to take effect.'
|
|
126
126
|
)) : '';
|
|
127
|
-
const crashReportsHeader = ( localize(
|
|
128
|
-
const errorsHeader = ( localize(
|
|
129
|
-
const usageHeader = ( localize(
|
|
130
|
-
const telemetryTableDescription = ( localize(
|
|
127
|
+
const crashReportsHeader = ( localize(2060, "Crash Reports"));
|
|
128
|
+
const errorsHeader = ( localize(2061, "Error Telemetry"));
|
|
129
|
+
const usageHeader = ( localize(2062, "Usage Data"));
|
|
130
|
+
const telemetryTableDescription = ( localize(2063, "The following table outlines the data sent with each setting:"));
|
|
131
131
|
const telemetryTable = `
|
|
132
132
|
| | ${crashReportsHeader} | ${errorsHeader} | ${usageHeader} |
|
|
133
133
|
|:------|:-------------:|:---------------:|:----------:|
|
|
@@ -137,7 +137,7 @@ function getTelemetryLevelSettingDescription() {
|
|
|
137
137
|
| off | - | - | - |
|
|
138
138
|
`;
|
|
139
139
|
const deprecatedSettingNote = ( localize(
|
|
140
|
-
|
|
140
|
+
2064,
|
|
141
141
|
"****Note:*** If this setting is 'off', no telemetry will be sent regardless of other telemetry settings. If this setting is set to anything except 'off' and telemetry is disabled with deprecated settings, no telemetry will be sent.*"
|
|
142
142
|
));
|
|
143
143
|
const telemetryDescription = `
|
|
@@ -159,16 +159,16 @@ configurationRegistry.registerConfiguration({
|
|
|
159
159
|
'id': TELEMETRY_SECTION_ID,
|
|
160
160
|
'order': 1,
|
|
161
161
|
'type': 'object',
|
|
162
|
-
'title': ( localize(
|
|
162
|
+
'title': ( localize(2065, "Telemetry")),
|
|
163
163
|
'properties': {
|
|
164
164
|
[TELEMETRY_SETTING_ID]: {
|
|
165
165
|
'type': 'string',
|
|
166
166
|
'enum': [TelemetryConfiguration.ON, TelemetryConfiguration.ERROR, TelemetryConfiguration.CRASH, TelemetryConfiguration.OFF],
|
|
167
167
|
'enumDescriptions': [
|
|
168
|
-
( localize(
|
|
169
|
-
( localize(
|
|
170
|
-
( localize(
|
|
171
|
-
( localize(
|
|
168
|
+
( localize(2066, "Sends usage data, errors, and crash reports.")),
|
|
169
|
+
( localize(2067, "Sends general error telemetry and crash reports.")),
|
|
170
|
+
( localize(2068, "Sends OS level crash reports.")),
|
|
171
|
+
( localize(2069, "Disables all product telemetry."))
|
|
172
172
|
],
|
|
173
173
|
'markdownDescription': getTelemetryLevelSettingDescription(),
|
|
174
174
|
'default': TelemetryConfiguration.ON,
|
|
@@ -182,24 +182,24 @@ configurationRegistry.registerConfiguration({
|
|
|
182
182
|
localization: {
|
|
183
183
|
description: {
|
|
184
184
|
key: 'telemetry.telemetryLevel.policyDescription',
|
|
185
|
-
value: ( localize(
|
|
185
|
+
value: ( localize(2070, "Controls the level of telemetry.")),
|
|
186
186
|
},
|
|
187
187
|
enumDescriptions: [
|
|
188
188
|
{
|
|
189
189
|
key: 'telemetry.telemetryLevel.default',
|
|
190
|
-
value: ( localize(
|
|
190
|
+
value: ( localize(2066, "Sends usage data, errors, and crash reports.")),
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
key: 'telemetry.telemetryLevel.error',
|
|
194
|
-
value: ( localize(
|
|
194
|
+
value: ( localize(2067, "Sends general error telemetry and crash reports.")),
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
key: 'telemetry.telemetryLevel.crash',
|
|
198
|
-
value: ( localize(
|
|
198
|
+
value: ( localize(2068, "Sends OS level crash reports.")),
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
key: 'telemetry.telemetryLevel.off',
|
|
202
|
-
value: ( localize(
|
|
202
|
+
value: ( localize(2069, "Disables all product telemetry.")),
|
|
203
203
|
}
|
|
204
204
|
]
|
|
205
205
|
}
|
|
@@ -209,7 +209,7 @@ configurationRegistry.registerConfiguration({
|
|
|
209
209
|
type: 'boolean',
|
|
210
210
|
default: true,
|
|
211
211
|
description: ( localize(
|
|
212
|
-
|
|
212
|
+
2071,
|
|
213
213
|
"Enable feedback mechanisms such as the issue reporter, surveys, and other feedback options."
|
|
214
214
|
)),
|
|
215
215
|
policy: {
|
|
@@ -217,7 +217,7 @@ configurationRegistry.registerConfiguration({
|
|
|
217
217
|
category: PolicyCategory.Telemetry,
|
|
218
218
|
minimumVersion: '1.99',
|
|
219
219
|
localization: { description: { key: 'telemetry.feedback.enabled', value: ( localize(
|
|
220
|
-
|
|
220
|
+
2071,
|
|
221
221
|
"Enable feedback mechanisms such as the issue reporter, surveys, and other feedback options."
|
|
222
222
|
)) } },
|
|
223
223
|
}
|
|
@@ -226,12 +226,12 @@ configurationRegistry.registerConfiguration({
|
|
|
226
226
|
'type': 'boolean',
|
|
227
227
|
'markdownDescription': !product.privacyStatementUrl ?
|
|
228
228
|
( localize(
|
|
229
|
-
|
|
229
|
+
2072,
|
|
230
230
|
"Enable diagnostic data to be collected. This helps us to better understand how {0} is performing and where improvements need to be made.",
|
|
231
231
|
product.nameLong
|
|
232
232
|
)) :
|
|
233
233
|
( localize(
|
|
234
|
-
|
|
234
|
+
2073,
|
|
235
235
|
"Enable diagnostic data to be collected. This helps us to better understand how {0} is performing and where improvements need to be made. [Read more]({1}) about what we collect and our privacy statement.",
|
|
236
236
|
product.nameLong,
|
|
237
237
|
product.privacyStatementUrl
|
|
@@ -239,7 +239,7 @@ configurationRegistry.registerConfiguration({
|
|
|
239
239
|
'default': true,
|
|
240
240
|
'restricted': true,
|
|
241
241
|
'markdownDeprecationMessage': ( localize(
|
|
242
|
-
|
|
242
|
+
2074,
|
|
243
243
|
"If this setting is false, no telemetry will be sent regardless of the new setting's value. Deprecated in favor of the {0} setting.",
|
|
244
244
|
`\`#${TELEMETRY_SETTING_ID}#\``
|
|
245
245
|
)),
|
|
@@ -40,6 +40,7 @@ import { IOutputService } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
40
40
|
import { LogLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log';
|
|
41
41
|
import { ILoggerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
42
42
|
import { VerifyExtensionSignatureConfigKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
43
|
+
import { TerminalContribSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/terminalContribExports';
|
|
43
44
|
|
|
44
45
|
var TelemetryContribution_1;
|
|
45
46
|
let TelemetryContribution = class TelemetryContribution extends Disposable {
|
|
@@ -137,7 +138,7 @@ let TelemetryContribution = class TelemetryContribution extends Disposable {
|
|
|
137
138
|
constructor() {
|
|
138
139
|
super({
|
|
139
140
|
id: 'workbench.action.showTelemetry',
|
|
140
|
-
title: ( localize2(
|
|
141
|
+
title: ( localize2(11459, "Show Telemetry")),
|
|
141
142
|
category: Categories.Developer,
|
|
142
143
|
f1: true
|
|
143
144
|
});
|
|
@@ -266,6 +267,12 @@ let ConfigurationTelemetryContribution = class ConfigurationTelemetryContributio
|
|
|
266
267
|
case AutoRestartConfigurationKey:
|
|
267
268
|
this.telemetryService.publicLog2('extensions.autoRestart', { settingValue: this.getValueToReport(key, target), source });
|
|
268
269
|
return;
|
|
270
|
+
case TerminalContribSettingId.OutputLocation:
|
|
271
|
+
this.telemetryService.publicLog2('terminal.integrated.chatAgentTools.outputLocation', { settingValue: this.getValueToReport(key, target), source });
|
|
272
|
+
return;
|
|
273
|
+
case TerminalContribSettingId.SuggestEnabled:
|
|
274
|
+
this.telemetryService.publicLog2('terminal.integrated.suggest.enabled', { settingValue: this.getValueToReport(key, target), source });
|
|
275
|
+
return;
|
|
269
276
|
}
|
|
270
277
|
}
|
|
271
278
|
};
|
|
@@ -7,7 +7,7 @@ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
7
7
|
import { ClassifiedEvent, IGDPRProperty, OmitMetadata, StrictPropertyCheck } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/gdprTypings";
|
|
8
8
|
import { ITelemetryData, TelemetryLevel } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry";
|
|
9
9
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
10
|
-
import { IBrowserWorkbenchEnvironmentService } from "@codingame/monaco-vscode-
|
|
10
|
+
import { IBrowserWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/browser/environmentService.service";
|
|
11
11
|
import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
12
12
|
export declare class TelemetryService extends Disposable implements ITelemetryService {
|
|
13
13
|
readonly _serviceBrand: undefined;
|
|
@@ -12,7 +12,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/ins
|
|
|
12
12
|
import { TelemetryLogAppender } from '../../../../platform/telemetry/common/telemetryLogAppender.js';
|
|
13
13
|
import { TelemetryService as TelemetryService$1 } from '../../../../platform/telemetry/common/telemetryService.js';
|
|
14
14
|
import { NullTelemetryService, supportsTelemetry, getTelemetryLevel, isInternalTelemetry, isLoggingOnly } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
15
|
-
import { IBrowserWorkbenchEnvironmentService } from '@codingame/monaco-vscode-
|
|
15
|
+
import { IBrowserWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
16
16
|
import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
17
17
|
import { resolveWorkbenchCommonProperties } from './workbenchCommonProperties.js';
|
|
18
18
|
|