@vscode/telemetry-extractor 1.9.7 → 1.9.9
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/out/cli-options.js +5 -1
- package/out/cli-options.js.map +1 -1
- package/out/extractor.js +5 -1
- package/out/extractor.js.map +1 -1
- package/out/lib/file-writer.js +5 -1
- package/out/lib/file-writer.js.map +1 -1
- package/out/lib/object-converter.js +9 -1
- package/out/lib/object-converter.js.map +1 -1
- package/out/lib/operations.js +5 -1
- package/out/lib/operations.js.map +1 -1
- package/out/lib/parser.js +10 -2
- package/out/lib/parser.js.map +1 -1
- package/out/lib/save-declarations.js +5 -1
- package/out/lib/save-declarations.js.map +1 -1
- package/out/lib/source-spec.js +5 -1
- package/out/lib/source-spec.js.map +1 -1
- package/out/lib/ts-parser.js +5 -1
- package/out/lib/ts-parser.js.map +1 -1
- package/package.json +7 -7
- package/src/lib/object-converter.ts +4 -0
- package/src/lib/parser.ts +6 -2
- package/documentation/adding-new-events.md +0 -168
- package/documentation/comment-code-annotations.md +0 -197
- package/documentation/typescript-code-annotations.md +0 -187
- package/documentation/using-the-tool.md +0 -107
package/out/cli-options.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/out/cli-options.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-options.js","sourceRoot":"","sources":["../src/cli-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-options.js","sourceRoot":"","sources":["../src/cli-options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,0EAAgD;AAChD,2CAA6B;AAE7B,SAAS,kBAAkB,CAAC,OAA2C;IACnE,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1B,IAAI,OAAO,CAAC,SAAS,EAAE;QACnB,OAAO,CAAC,SAAS,GAAI,OAAO,CAAC,SAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;KACtF;IACD,IAAI,OAAO,CAAC,SAAS,EAAE;QACnB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;KAC5D;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AAEY,QAAA,iBAAiB,GAAG;IAC7B,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,2EAA2E,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACzJ,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,0FAA0F,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE;IAC5L,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,yDAAyD,EAAE,IAAI,EAAE,MAAM,EAAE;IACpH,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,4EAA4E,EAAE,IAAI,EAAE,MAAM,EAAE;IAC1I,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,qCAAqC,EAAE,IAAI,EAAE,MAAM,EAAE;IAClG,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,0DAA0D,EAAE,YAAY,EAAE,EAAE,EAAE;IAC5I,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,iFAAiF,EAAE,YAAY,EAAE,KAAK,EAAE;IAChK,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE;IAC1E,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,iCAAiC,EAAE,YAAY,EAAE,KAAK,EAAE;IAC7G,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE;CACtE,CAAC;AAEW,QAAA,OAAO,GAAG,kBAAkB,CAAC,IAAA,2BAAe,EAAC,yBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC"}
|
package/out/extractor.js
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
4
|
if (k2 === undefined) k2 = k;
|
|
5
|
-
Object.
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
6
10
|
}) : (function(o, m, k, k2) {
|
|
7
11
|
if (k2 === undefined) k2 = k;
|
|
8
12
|
o[k2] = m[k];
|
package/out/extractor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractor.js","sourceRoot":"","sources":["../src/extractor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extractor.js","sourceRoot":"","sources":["../src/extractor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAAuC;AACvC,kCAAkC;AAClC,+CAAwC;AACxC,2CAA6B;AAC7B,qCAA8B;AAC9B,+DAAqF;AACrF,mDAA0F;AAC1F,yCAA0C;AAE1C,IAAI,qBAAO,CAAC,MAAM,EAAE;IAChB,MAAM,WAAW,GAAG,IAAA,wCAA0B,EAAC,qBAAO,CAAC,MAAM,CAAC,CAAC;IAC/D,IAAA,iDAA6B,EAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE;QAC7D,IAAI,qBAAO,CAAC,SAAS,EAAE;YACnB,IAAA,+BAAW,EAAC,qBAAO,CAAC,SAAS,EAAE,YAAY,EAAE,qBAAO,CAAC,QAAQ,IAAI,iBAAiB,EAAE,CAAC,qBAAO,CAAC,MAAM,CAAC,CAAC;SACxG;aAAM;YACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;SAC7C;IACL,CAAC,CAAC,CAAC;CACN;KAAM,IAAI,qBAAO,CAAC,IAAI,IAAI,CAAC,qBAAO,CAAC,SAAS,EAAE;IAC3C,OAAO,CAAC,YAAY,CAAC,CAAC;CACzB;KAAM;IACH,MAAM,aAAa,GAAkB;QACjC,WAAW,EAAE,qBAAO,CAAC,WAAW;QAChC,cAAc,EAAE,qBAAO,CAAC,cAAc;QACtC,gBAAgB,EAAE,KAAK;QACvB,eAAe,EAAE,KAAK;QACtB,aAAa,EAAE,qBAAO,CAAC,aAAa;QACpC,OA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CAAC,IAAI,CAAC,OAAO,CAAC,IAAA,aAAG,GAAE,EAAE,CAAC,CAAC,CAAC,CAAC;KAChD;AACL,CAAC"}
|
package/out/lib/file-writer.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-writer.js","sourceRoot":"","sources":["../../src/lib/file-writer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-writer.js","sourceRoot":"","sources":["../../src/lib/file-writer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,uCAAyB;AACzB,2CAA6B;AAE7B;;;;GAIG;AACI,KAAK,UAAU,SAAS,CAAC,UAAkB,EAAE,QAAgB;IAChE,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3C,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,GAAW,EAAE,EAAE;QAC1C,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,GAAQ,EAAE,EAAE;gBAClE,IAAI,GAAG,EAAE;oBACL,MAAM,CAAC,GAAG,CAAC,CAAC;iBACf;qBAAM;oBACH,OAAO,EAAE,CAAC;iBACb;YACL,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,8BAaC;AAED,+EAA+E;AAC/E,KAAK,UAAU,MAAM,CAAC,GAAW;IAC7B,OAAO,KAAK,CAAC,GAAG,CAAC;SACZ,IAAI,CAAC,IAAI,EAAE,UAAU,GAAQ;QAC1B,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC9B,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC/B,IAAI,MAAM,KAAK,GAAG,EAAE,EAAE,yBAAyB;gBAC3C,OAAO,MAAM,CAAC,MAAM,CAAC;qBAChB,IAAI,CAAC;oBACF,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;gBACtB,CAAC,CAAC,CAAC;aACV;SACJ;QACD,MAAM,GAAG,CAAC;IACd,CAAC,CAAC,CAAC;AACX,CAAC;AAED,+EAA+E;AAC/E,KAAK,UAAU,KAAK,CAAC,GAAW;IAC5B,OAAO,IAAI,OAAO,CAAC,UAAU,OAAO,EAAE,MAAM;QACxC,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,UAAU,GAAQ;YAC5B,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC9B,MAAM,CAAC,GAAG,CAAC,CAAC;aACf;iBAAM;gBACH,OAAO,CAAC,GAAG,CAAC,CAAC;aAChB;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -32,6 +36,10 @@ async function transformOutput(output) {
|
|
|
32
36
|
const newEvents = Object.create(null);
|
|
33
37
|
const oldEvents = output.events.dataPoints;
|
|
34
38
|
for (const event of oldEvents) {
|
|
39
|
+
// Check if event.name contains a number if so throw an error because we don't support numbers in event names
|
|
40
|
+
if (/\d/.test(event.name)) {
|
|
41
|
+
throw new Error(`Event name ${event.name} contains a number. Event names cannot contain numbers.`);
|
|
42
|
+
}
|
|
35
43
|
newEvents[event.name] = Object.create(null);
|
|
36
44
|
//We know there won't be anymore includes or inlines because we have resolved them
|
|
37
45
|
for (const property of event.properties) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-converter.js","sourceRoot":"","sources":["../../src/lib/object-converter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"object-converter.js","sourceRoot":"","sources":["../../src/lib/object-converter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,2DAA+C;AAC/C,qCAA8C;AAC9C,qDAAuC;AAEvC,4EAA4E;AAErE,KAAK,UAAU,eAAe,CAAC,MAA6B;IAC/D,mEAAmE;IACnE,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;QAC1F,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAC9B;IACD,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC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;YACxD,IAAI,QAAQ,CAAC,aAAa;gBAAE,mBAAmB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC;YAC7H,SAAS;SACZ;QACD,mBAAmB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,cAAc,EAAE,QAAQ,CAAC,cAAc,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;QAChI,IAAI,QAAQ,CAAC,QAAQ,EAAE;YACnB,mBAAmB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC;SAC1F;QACD,IAAI,QAAQ,CAAC,aAAa,EAAE;YACxB,mBAAmB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC;SACpG;KACJ;IACD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;AACxE,CAAC;AA9ED,0CA8EC;AAED,SAAS,kBAAkB,CAAC,IAAY;IACpC,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAC1B,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;QAC3B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;KAC/C;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
package/out/lib/operations.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/lib/operations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/lib/operations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,2CAAkD;AAClD,qCAA6F;AAC7F,2DAA+C;AAC/C,qDAAuC;AAEvC,SAAgB,KAAK,CAAC,MAA0B,EAAE,MAA0B;IACxE,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,UAAU,EAAE;QAClC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;YACvC,OAAO,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC;QAC/B,CAAC,CAAC,CAAC;QACH,mEAAmE;QACnE,IAAI,KAAK,EAAE;YACP,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC/D;aAAM;YACH,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAChC;KACJ;AACL,CAAC;AAZD,sBAYC;AAED,qEAAqE;AACrE,sFAAsF;AACtF,SAAgB,YAAY,CAAC,YAAgC,EAAE,IAAY;IACvE,IAAI,KAAK,GAAG,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAC9C,OAAO,IAAI,CAAC,IAAI,KA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AAG,eAAe,CAAC,aAAa,CAAC;aACtD;YACD,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAChC;KACJ;AACL,CAAC;AAzBD,gDAyBC;AAED,SAAgB,8BAA8B,CAAC,SAAiB,EAAE,YAAsB;IACpF,MAAM,kBAAkB,GAAG,EAAE,CAAC;IAC9B,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE;QACjC,IAAI,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;YAC9B,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC;SAC5D;KACJ;IACD,OAAO,kBAAkB,CAAC;AAC9B,CAAC;AARD,wEAQC"}
|
package/out/lib/parser.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -26,6 +30,7 @@ const ripgrep_1 = require("@vscode/ripgrep");
|
|
|
26
30
|
const path = __importStar(require("path"));
|
|
27
31
|
const cp = __importStar(require("child_process"));
|
|
28
32
|
const fs = __importStar(require("fs"));
|
|
33
|
+
// Not importing 'process' as tsc claims `process.exitCode` is read-only when it actually is not.
|
|
29
34
|
const fragments_1 = require("./fragments");
|
|
30
35
|
const common_properties_1 = require("./common-properties");
|
|
31
36
|
const events_1 = require("./events");
|
|
@@ -90,6 +95,7 @@ class Parser {
|
|
|
90
95
|
catch (error) {
|
|
91
96
|
console.error(`Common Property Declaration Error: ${error} in file ${filePath}`);
|
|
92
97
|
console.error(`Source comment:\n${match[0]}`);
|
|
98
|
+
process.exitCode = 1;
|
|
93
99
|
}
|
|
94
100
|
});
|
|
95
101
|
return commonPropertyDeclarations;
|
|
@@ -99,7 +105,7 @@ class Parser {
|
|
|
99
105
|
const ripgrepPattern = '/\*\\s*__GDPR__FRAGMENT__';
|
|
100
106
|
return this.findFiles(ripgrepPattern, sourceDir);
|
|
101
107
|
}
|
|
102
|
-
///
|
|
108
|
+
///
|
|
103
109
|
findFragments(sourceDir) {
|
|
104
110
|
const filesWithFragments = this.asAbsoluteFilePaths(this.findFilesWithFragments(sourceDir));
|
|
105
111
|
// Using [\s\S]* instead of .* since the latter does not match when using /m option
|
|
@@ -118,6 +124,7 @@ class Parser {
|
|
|
118
124
|
catch (error) {
|
|
119
125
|
console.error(`Fragment Declaration Error: ${error} in file ${filePath}`);
|
|
120
126
|
console.error(`Source comment:\n${match[0]}`);
|
|
127
|
+
process.exitCode = 1;
|
|
121
128
|
}
|
|
122
129
|
});
|
|
123
130
|
return fragmentDeclarations;
|
|
@@ -145,6 +152,7 @@ class Parser {
|
|
|
145
152
|
catch (error) {
|
|
146
153
|
console.error(`Event Declaration Error: ${error} in file ${filePath}`);
|
|
147
154
|
console.error(`Source comment:\n${match[0]}`);
|
|
155
|
+
process.exitCode = 1;
|
|
148
156
|
}
|
|
149
157
|
});
|
|
150
158
|
return eventDeclarations;
|
package/out/lib/parser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/lib/parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/lib/parser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AACl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C,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;iBACzI;gBACD,OAAO,OAAO,CAAC,YAAY,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AA9KD,wBA8KC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-declarations.js","sourceRoot":"","sources":["../../src/lib/save-declarations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"save-declarations.js","sourceRoot":"","sources":["../../src/lib/save-declarations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,2CAA6B;AAC7B,qCAAkC;AAClC,0DAA4C;AAC5C,iDAA4E;AAC5E,yDAAqD;AACrD,qCAAkC;AAClC,2DAAuD;AACvD,2CAAuC;AACvC,+CAAiD;AAEjD,qCAAsC;AAEtC,SAAgB,WAAW,CAAC,SAAiB,EAAE,QAAgB,EAAE,QAAgB,EAAE,mBAA4B;IAC3G,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QACpC,IAAA,mBAAU,EAAC,6CAA6C,EAAE,CAAC,mBAAm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AY,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YAC3I,eAAe,CAAC,MAAM,CAAC,UAAU,GAAG,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC7G,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE,sBAAsB,CAAC,CAAC;SACpE;QACD,MAAM,qBAAqB,GAAQ,MAAM,IAAA,kCAAe,EAAC,eAAe,CAAC,CAAC;QAC1E,KAAK,MAAM,GAAG,IAAI,yBAAyB,EAAE;YACzC,mEAAmE;YACnE,6DAA6D;YAC7D,IAAI,qBAAqB,CAAC,MAAM,KAAK,SAAS,EAAE;gBAC5C,qBAAqB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aACtD;YACD,qBAAqB,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,yBAAyB,CAAC,GAAG,CAAC,CAAC;SACtE;QACD,OAAO,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;KACjD;IAAC,OAAO,KAAK,EAAE;QACZ,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC;QACjC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KAChC;AACL,CAAC;AA9CD,sEA8CC"}
|
package/out/lib/source-spec.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-spec.js","sourceRoot":"","sources":["../../src/lib/source-spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"source-spec.js","sourceRoot":"","sources":["../../src/lib/source-spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,2BAA4C;AAC5C,2CAA6B;AAC7B,qCAA8B;AAgB7B,CAAC;AAEF,SAAgB,0BAA0B,CAAC,IAAc;IACrD,IAAI;QACA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QACzD,MAAM,WAAW,GAAiB,EAAE,CAAC;QACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACtB,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YACzB,gBAAgB;YAChB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/D,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,aAAG,GAAE,CAAC;YAC5D,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC;YAC9E,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC;YAC3E,MAAM,aAAa,GAAkB;gBACjC,WAAW,EAAE,IAAI,CAAC,WAAW,CA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EAAE,CAAC,CAAC,CAAC,CAAC;KAChD;AACL,CAAC"}
|
package/out/lib/ts-parser.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/out/lib/ts-parser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-parser.js","sourceRoot":"","sources":["../../src/lib/ts-parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ts-parser.js","sourceRoot":"","sources":["../../src/lib/ts-parser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,uCAA6E;AAC7E,uCAAyB;AACzB,kDAAoC;AACpC,2CAA6B;AAC7B,6CAAyC;AACzC,6CAA8D;AAC9D,qCAA4C;AAG5C,MAAM,WAAW;IAEL,OAAO,CAAO;IACd,SAAS,CAAS;IAClB,MAAM,GAAY,KAAK,CAAC;IACxB,kBAAkB,CAAS;IAC3B,cAAc,CAAU;IACzB,UAAU,GAAe,EAAE,CAAC;IAC3B,iBAAiB,GAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACrD,YAAY,gBAAsB,EAAE,SAAiB,EAAE,cAAuB;QAC1E,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC;QAChC,IAAI,CAAC,SAAS,GAA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ClB,CAAC;CACJ;AA9GD,4BA8GC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscode/telemetry-extractor",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.9",
|
|
4
4
|
"description": "Extracts telemetry from VS Code",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"typings": "vscode-telemetry-extractor.d.ts",
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"command-line-args": "^5.2.1",
|
|
26
|
-
"ts-morph": "^
|
|
27
|
-
"@vscode/ripgrep": "^1.
|
|
26
|
+
"ts-morph": "^15.1.0",
|
|
27
|
+
"@vscode/ripgrep": "^1.15.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/command-line-args": "^5.2.0",
|
|
31
|
-
"@types/mocha": "^9.
|
|
31
|
+
"@types/mocha": "^9.1.1",
|
|
32
32
|
"@types/node": "^15.12.2",
|
|
33
33
|
"mocha": "^9.1.3",
|
|
34
34
|
"nyc": "^15.1.0",
|
|
35
|
-
"source-map-support": "^0.5.
|
|
36
|
-
"ts-node": "^10.
|
|
37
|
-
"typescript": "^4.
|
|
35
|
+
"source-map-support": "^0.5.21",
|
|
36
|
+
"ts-node": "^10.9.1",
|
|
37
|
+
"typescript": "^4.7.4"
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -15,6 +15,10 @@ export async function transformOutput(output: OutputtedDeclarations): Promise<Ou
|
|
|
15
15
|
const newEvents = Object.create(null);
|
|
16
16
|
const oldEvents = output.events.dataPoints;
|
|
17
17
|
for (const event of oldEvents) {
|
|
18
|
+
// Check if event.name contains a number if so throw an error because we don't support numbers in event names
|
|
19
|
+
if (/\d/.test(event.name)) {
|
|
20
|
+
throw new Error(`Event name ${event.name} contains a number. Event names cannot contain numbers.`);
|
|
21
|
+
}
|
|
18
22
|
newEvents[event.name] = Object.create(null);
|
|
19
23
|
//We know there won't be anymore includes or inlines because we have resolved them
|
|
20
24
|
for (const property of event.properties as Array<Property | Wildcard | Metadata>) {
|
package/src/lib/parser.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { rgPath } from '@vscode/ripgrep';
|
|
|
4
4
|
import * as path from 'path';
|
|
5
5
|
import * as cp from 'child_process';
|
|
6
6
|
import * as fs from 'fs';
|
|
7
|
+
// Not importing 'process' as tsc claims `process.exitCode` is read-only when it actually is not.
|
|
7
8
|
import { Fragments } from './fragments';
|
|
8
9
|
import { Property, CommonProperties } from './common-properties';
|
|
9
10
|
import { Events } from './events';
|
|
@@ -79,6 +80,7 @@ export class Parser {
|
|
|
79
80
|
} catch (error) {
|
|
80
81
|
console.error(`Common Property Declaration Error: ${error} in file ${filePath}`);
|
|
81
82
|
console.error(`Source comment:\n${match[0]}`);
|
|
83
|
+
process.exitCode = 1;
|
|
82
84
|
}
|
|
83
85
|
});
|
|
84
86
|
return commonPropertyDeclarations;
|
|
@@ -90,7 +92,7 @@ export class Parser {
|
|
|
90
92
|
return this.findFiles(ripgrepPattern, sourceDir);
|
|
91
93
|
}
|
|
92
94
|
|
|
93
|
-
///
|
|
95
|
+
///
|
|
94
96
|
private findFragments(sourceDir: string) {
|
|
95
97
|
const filesWithFragments = this.asAbsoluteFilePaths(this.findFilesWithFragments(sourceDir));
|
|
96
98
|
|
|
@@ -109,6 +111,7 @@ export class Parser {
|
|
|
109
111
|
} catch (error) {
|
|
110
112
|
console.error(`Fragment Declaration Error: ${error} in file ${filePath}`);
|
|
111
113
|
console.error(`Source comment:\n${match[0]}`);
|
|
114
|
+
process.exitCode = 1;
|
|
112
115
|
}
|
|
113
116
|
});
|
|
114
117
|
return fragmentDeclarations;
|
|
@@ -138,6 +141,7 @@ export class Parser {
|
|
|
138
141
|
} catch (error) {
|
|
139
142
|
console.error(`Event Declaration Error: ${error} in file ${filePath}`);
|
|
140
143
|
console.error(`Source comment:\n${match[0]}`);
|
|
144
|
+
process.exitCode = 1;
|
|
141
145
|
}
|
|
142
146
|
});
|
|
143
147
|
return eventDeclarations;
|
|
@@ -181,4 +185,4 @@ export class Parser {
|
|
|
181
185
|
});
|
|
182
186
|
});
|
|
183
187
|
}
|
|
184
|
-
}
|
|
188
|
+
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
[Draft Content]
|
|
2
|
-
|
|
3
|
-
# Adding new telemetry to VS Code
|
|
4
|
-
|
|
5
|
-
The process of logging and annotating telemetry in the codebase is documented [here](typescript-code-annotations.md).
|
|
6
|
-
|
|
7
|
-
However, we want to limit telemetry bloat, and ensure that each event added to the product is in use. So before adding telemetry, ask yourself the following questions:
|
|
8
|
-
- Will the event be used to gather essential business insight?
|
|
9
|
-
- Is this an event that could make use of the "expiration" tag (described in the Syntax section [here](comment-code-annotations.md))?
|
|
10
|
-
- Do you have an appropriate owner for the event - basically, a contact that can speak to its function and determine if it's still in use?
|
|
11
|
-
|
|
12
|
-
# Telemetry Catalog
|
|
13
|
-
|
|
14
|
-
The following is generated directly from the annotations in VS Code.
|
|
15
|
-
|
|
16
|
-
| Event | Owner | Link to Declaration | Comment |
|
|
17
|
-
| ----------------- | ----------------- | --------------------- | ----------- |
|
|
18
|
-
| monacoworkbench/extensiongallery:install |
|
|
19
|
-
| monacoworkbench/extensiongallery:uninstall |
|
|
20
|
-
| monacoworkbench/extensiongallery:update |
|
|
21
|
-
| monacoworkbench/galleryservice:downloadvsix |
|
|
22
|
-
| monacoworkbench/remoteextensionrecommendations:popup |
|
|
23
|
-
| monacoworkbench/query-expfeature |
|
|
24
|
-
| monacoworkbench/startuptimevaried |
|
|
25
|
-
| monacoworkbench/webviews:createwebviewpanel |
|
|
26
|
-
| monacoworkbench/editoropened |
|
|
27
|
-
| monacoworkbench/editorclosed |
|
|
28
|
-
| monacoworkbench/debugsessionstart |
|
|
29
|
-
| monacoworkbench/debugsessionstop |
|
|
30
|
-
| monacoworkbench/debug/didviewmemory |
|
|
31
|
-
| monacoworkbench/cessurvey:popup |
|
|
32
|
-
| monacoworkbench/cessurvey:schedule |
|
|
33
|
-
| monacoworkbench/watermark:open |
|
|
34
|
-
| monacoworkbench/searchresultsfirstrender |
|
|
35
|
-
| monacoworkbench/searchresultsfinished |
|
|
36
|
-
| monacoworkbench/searchresultsshown |
|
|
37
|
-
| monacoworkbench/exthostunresponsive |
|
|
38
|
-
| monacoworkbench/extension:enable |
|
|
39
|
-
| monacoworkbench/extension:disable |
|
|
40
|
-
| monacoworkbench/extensiongallery:openextension |
|
|
41
|
-
| monacoworkbench/extensiongallery:install:recommendations |
|
|
42
|
-
| monacoworkbench/workspce.tags |
|
|
43
|
-
| monacoworkbench/workspace.remotes |
|
|
44
|
-
| monacoworkbench/workspace.azure |
|
|
45
|
-
| monacoworkbench/webview.createwebview |
|
|
46
|
-
| monacoworkbench/terminallatencystats |
|
|
47
|
-
| monacoworkbench/languagepacksuggestion:popup |
|
|
48
|
-
| monacoworkbench/taskservice.engineversion |
|
|
49
|
-
| monacoworkbench/taskservice |
|
|
50
|
-
| monacoworkbench/settingseditor.settingmodified |
|
|
51
|
-
| monacoworkbench/settingseditor.filter |
|
|
52
|
-
| monacoworkbench/settingseditor.searcherror |
|
|
53
|
-
| monacoworkbench/workbenchactionexecuted |
|
|
54
|
-
| monacoworkbench/views.togglevisibility |
|
|
55
|
-
| monacoworkbench/views.welcomeaction |
|
|
56
|
-
| monacoworkbench/notification:show |
|
|
57
|
-
| monacoworkbench/notification:close |
|
|
58
|
-
| monacoworkbench/notification:hide |
|
|
59
|
-
| monacoworkbench/notification:actionexecuted |
|
|
60
|
-
| monacoworkbench/automaticlanguagedetection.likelywrong |
|
|
61
|
-
| monacoworkbench/workbencheditorreopen |
|
|
62
|
-
| monacoworkbench/activitybaraction |
|
|
63
|
-
| monacoworkbench/keybindingseditor.action |
|
|
64
|
-
| monacoworkbench/workspacetrustdisabled |
|
|
65
|
-
| monacoworkbench/workspacetrustfoldercounts |
|
|
66
|
-
| monacoworkbench/workspacetruststatechanged |
|
|
67
|
-
| monacoworkbench/workspacefolderdepthbelowtrustedfolder |
|
|
68
|
-
| monacoworkbench/experiments |
|
|
69
|
-
| monacoworkbench/webviewmissingcsp |
|
|
70
|
-
| monacoworkbench/searcheditor/savesearchresults |
|
|
71
|
-
| monacoworkbench/searcheditor/opennewsearcheditor |
|
|
72
|
-
| monacoworkbench/searcheditor/createeditorfromsearchresult |
|
|
73
|
-
| monacoworkbench/fileextensionsuggestion:popup |
|
|
74
|
-
| monacoworkbench/extensionworkspacerecommendations:open |
|
|
75
|
-
| monacoworkbench/extensionsrecommendations:ignorerecommendation |
|
|
76
|
-
| monacoworkbench/extensionrecommendations:popup |
|
|
77
|
-
| monacoworkbench/extensionworkspacerecommendations:popup |
|
|
78
|
-
| monacoworkbench/dynamicworkspacerecommendations |
|
|
79
|
-
| monacoworkbench/gettingstarted.didautoopenwalkthrough |
|
|
80
|
-
| monacoworkbench/gettingstarted.actionexecuted |
|
|
81
|
-
| monacoworkbench/windowsedition |
|
|
82
|
-
| monacoworkbench/sync/handleconflicts |
|
|
83
|
-
| monacoworkbench/sync/showconflicts |
|
|
84
|
-
| monacoworkbench/workspaceload |
|
|
85
|
-
| monacoworkbench/settingsread |
|
|
86
|
-
| monacoworkbench/fileget |
|
|
87
|
-
| monacoworkbench/settingswritten |
|
|
88
|
-
| monacoworkbench/fileput |
|
|
89
|
-
| monacoworkbench/notebook/editoropened |
|
|
90
|
-
| monacoworkbench/notebook/editoropenperf |
|
|
91
|
-
| monacoworkbench/startup.resource.perf |
|
|
92
|
-
| monacoworkbench/remotereconnectionreload |
|
|
93
|
-
| monacoworkbench/remoteconnectionlost |
|
|
94
|
-
| monacoworkbench/remotereconnectionrunning |
|
|
95
|
-
| monacoworkbench/remotereconnectionpermanentfailure |
|
|
96
|
-
| monacoworkbench/remoteconnectiongain |
|
|
97
|
-
| monacoworkbench/automaticlanguagedetection.stats |
|
|
98
|
-
| monacoworkbench/openkeybindings |
|
|
99
|
-
| monacoworkbench/startup.timer.mark |
|
|
100
|
-
| monacoworkbench/tasclientreadtreatmentcomplete |
|
|
101
|
-
| monacoworkbench/uri_invoked/start |
|
|
102
|
-
| monacoworkbench/uri_invoked/cancel |
|
|
103
|
-
| monacoworkbench/uri_invoked/end |
|
|
104
|
-
| monacoworkbench/uri_invoked/activate_extension/start |
|
|
105
|
-
| monacoworkbench/uri_invoked/activate_extension/cancel |
|
|
106
|
-
| monacoworkbench/uri_invoked/activate_extension/accept |
|
|
107
|
-
| monacoworkbench/uri_invoked/enable_extension/start |
|
|
108
|
-
| monacoworkbench/uri_invoked/enable_extension/cancel |
|
|
109
|
-
| monacoworkbench/uri_invoked/enable_extension/accept |
|
|
110
|
-
| monacoworkbench/uri_invoked/install_extension/start |
|
|
111
|
-
| monacoworkbench/uri_invoked/install_extension/cancel |
|
|
112
|
-
| monacoworkbench/uri_invoked/install_extension/accept |
|
|
113
|
-
| monacoworkbench/uri_invoked/install_extension/reload |
|
|
114
|
-
| monacoworkbench/extensionhostcrash |
|
|
115
|
-
| monacoworkbench/extensionhostcrashextension |
|
|
116
|
-
| monacoworkbench/extensionhoststartup |
|
|
117
|
-
| monacoworkbench/extensionsmessage |
|
|
118
|
-
| monacoworkbench/extensionactivationerror |
|
|
119
|
-
| monacoworkbench/cachedsearchcomplete |
|
|
120
|
-
| monacoworkbench/searchcomplete |
|
|
121
|
-
| monacoworkbench/textsearchcomplete |
|
|
122
|
-
| monacoworkbench/sync/firsttimesync |
|
|
123
|
-
| monacoworkbench/sync.useraccount |
|
|
124
|
-
| monacoworkbench/sync/successiveauthfailures |
|
|
125
|
-
| monacoworkbench/viewdescriptorservice.moveviews |
|
|
126
|
-
| monacoworkbench/accessibility |
|
|
127
|
-
| monacoworkbench/activateplugin |
|
|
128
|
-
| monacoworkbench/override.viewtype |
|
|
129
|
-
| monacoworkbench/remoteconnectionfailure |
|
|
130
|
-
| monacoworkbench/suggest.durations.json |
|
|
131
|
-
| monacoworkbench/suggest.acceptedsuggestion |
|
|
132
|
-
| monacoworkbench/codeaction.applycodeaction |
|
|
133
|
-
| monacoworkbench/update:notavailable |
|
|
134
|
-
| monacoworkbench/update:downloaded |
|
|
135
|
-
| monacoworkbench/sync/error |
|
|
136
|
-
| monacoworkbench/sync.enable |
|
|
137
|
-
| monacoworkbench/sync/turnoffeverywhere |
|
|
138
|
-
| monacoworkbench/autosync/error |
|
|
139
|
-
| monacoworkbench/sync/triggered |
|
|
140
|
-
| monacoworkbench/sync/conflictsdetected |
|
|
141
|
-
| monacoworkbench/sync/conflictsresolved |
|
|
142
|
-
| monacoworkbench/sync/incompatible |
|
|
143
|
-
| monacoworkbench/workspace.stats |
|
|
144
|
-
| monacoworkbench/workspace.stats.file |
|
|
145
|
-
| monacoworkbench/workspace.stats.launchconfigfile |
|
|
146
|
-
| monacoworkbench/workspace.stats.configfiles |
|
|
147
|
-
| monacoworkbench/updateconfiguration |
|
|
148
|
-
| monacoworkbench/windowerror |
|
|
149
|
-
| monacoworkbench/galleryservice:additionalquery |
|
|
150
|
-
| monacoworkbench/galleryservice:query |
|
|
151
|
-
| monacoworkbench/galleryservice:cdnfallback |
|
|
152
|
-
| monacoworkbench/exeextensionrecommendations:alreadyinstalled |
|
|
153
|
-
| monacoworkbench/exeextensionrecommendations:notinstalled |
|
|
154
|
-
| monacoworkbench/authentication.providerusage |
|
|
155
|
-
| monacoworkbench/api/scm/createsourcecontrol |
|
|
156
|
-
| monacoworkbench/shimming.keytar |
|
|
157
|
-
| monacoworkbench/shimming.open |
|
|
158
|
-
| monacoworkbench/shimming.open.call.noforward |
|
|
159
|
-
| monacoworkbench/extensionactivationtimes |
|
|
160
|
-
| monacoworkbench/exthostdeprecatedapiusage |
|
|
161
|
-
| monacoworkbench/sharedprocesserror |
|
|
162
|
-
| monacoworkbench/serverstart |
|
|
163
|
-
| monacoworkbench/startuplayout |
|
|
164
|
-
| monacoworkbench/editoractioninvoked |
|
|
165
|
-
| monacoworkbench/unhandlederror |
|
|
166
|
-
| websitetracking/newuserinstall |
|
|
167
|
-
| websitetracking/dbconnectionlog |
|
|
168
|
-
| websitetracking/download|
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
# Annotating your Code
|
|
2
|
-
|
|
3
|
-
**NOTE**: If using Typescript we recommend annotating your telemetry events with typings as shown [here](typescript-code-annotations.md)
|
|
4
|
-
|
|
5
|
-
All telemetry events we send need to be described. For each property of each event we need to know what kind of data they contain and for what reason we collect the data.
|
|
6
|
-
|
|
7
|
-
Let's assume we send the following event and the timer data is dynamic, i.e. the properties of `timer` can not be known statically:
|
|
8
|
-
```ts
|
|
9
|
-
logEvent('E1', {
|
|
10
|
-
E1P1: 'activitybar',
|
|
11
|
-
...f1,
|
|
12
|
-
...f4,
|
|
13
|
-
timer: {
|
|
14
|
-
waited: 536,
|
|
15
|
-
processing: 43,
|
|
16
|
-
queued: 97,
|
|
17
|
-
elasped: 812
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
The event is constructed in multiple steps, normally scattered across several files:
|
|
23
|
-
```ts
|
|
24
|
-
function logEvent(eventName, eventData) {
|
|
25
|
-
eventData.CP1 = getSQMUserId();
|
|
26
|
-
service.sendEvent(eventName, eventData);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
let f1 : F1 = { F1P1 : 23 };
|
|
30
|
-
|
|
31
|
-
let f2 : F2 = { F2P1 : document.getLine(1) };
|
|
32
|
-
|
|
33
|
-
let f3 : F3 = { F3P1: publisher.displayName };
|
|
34
|
-
|
|
35
|
-
let f4 : F4 = {
|
|
36
|
-
F4P1: extension.extensionName,
|
|
37
|
-
F4P2: {
|
|
38
|
-
...f2,
|
|
39
|
-
...f3
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
logEvent('E1', {
|
|
44
|
-
E1P1: 'activitybar',
|
|
45
|
-
...f1,
|
|
46
|
-
...f4,
|
|
47
|
-
timer: {
|
|
48
|
-
waited: 536,
|
|
49
|
-
processing: 43,
|
|
50
|
-
queued: 97,
|
|
51
|
-
elasped: 812
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
In order to extract the event descriptions with simple scanners we use specific comments to describe telemetry events and their properties. We place those comments as close as possible to where the events and properties are generated. The code above would be annotated as follows:
|
|
57
|
-
```ts
|
|
58
|
-
// __GDPR__COMMON__ "CP1" : { "endPoint": "SqmUserId", "classification": "EndUserPseudonymizedInformation", "purpose": "BusinessInsight" }
|
|
59
|
-
function logEvent(eventName, eventData) {
|
|
60
|
-
eventData.CP1 = getSQMUserId();
|
|
61
|
-
service.sendEvent(eventName, eventData);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* __GDPR__FRAGMENT__
|
|
65
|
-
"F1" : {
|
|
66
|
-
"F1P1": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
|
67
|
-
}
|
|
68
|
-
*/
|
|
69
|
-
let f1 : F1 = { F1P1 : 23 };
|
|
70
|
-
|
|
71
|
-
/* __GDPR__FRAGMENT__
|
|
72
|
-
"F2" : {
|
|
73
|
-
"F2P1" : { "classification": "CustomerContent", "purpose": "PerformanceAndHealth" }
|
|
74
|
-
}
|
|
75
|
-
*/
|
|
76
|
-
let f2 : F2 = { F2P1 : document.getLine(1) };
|
|
77
|
-
|
|
78
|
-
/* __GDPR__FRAGMENT__
|
|
79
|
-
"F3" : {
|
|
80
|
-
"F3P1" : { "classification": "PublicPersonalData", "purpose": "FeatureInsight" }
|
|
81
|
-
}
|
|
82
|
-
*/
|
|
83
|
-
let f3 : F3 = { F3P1: publisher.displayName };
|
|
84
|
-
|
|
85
|
-
/* __GDPR__FRAGMENT__
|
|
86
|
-
"F4" : {
|
|
87
|
-
"F4P1" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
|
|
88
|
-
"F4P2": {
|
|
89
|
-
"${inline}": [
|
|
90
|
-
"${F2}",
|
|
91
|
-
"${F3}"
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
*/
|
|
96
|
-
let f4 : F4 = {
|
|
97
|
-
F4P1: extension.extensionName,
|
|
98
|
-
F4P2: {
|
|
99
|
-
...f2,
|
|
100
|
-
...f3
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
/* __GDPR__
|
|
105
|
-
"E1" : {
|
|
106
|
-
"E1P1" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
|
107
|
-
"${include}": [
|
|
108
|
-
"${F1}",
|
|
109
|
-
"${F4}"
|
|
110
|
-
],
|
|
111
|
-
"${wildcard}": [
|
|
112
|
-
{
|
|
113
|
-
"${prefix}": "timer.",
|
|
114
|
-
"${classification}": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
|
115
|
-
}
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
*/
|
|
119
|
-
logEvent('E1', {
|
|
120
|
-
E1P1: 'activitybar',
|
|
121
|
-
...f1,
|
|
122
|
-
...f4,
|
|
123
|
-
timer: {
|
|
124
|
-
waited: 536,
|
|
125
|
-
processing: 43,
|
|
126
|
-
queued: 97,
|
|
127
|
-
elasped: 812
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
The GDPR comments are processed and result in the following final description of the `E1` event. Every property that starts with `timer.` -- such as `timer.waited` -- is classified as system metadata that we collect for gaining insights into how the feature is being used.
|
|
133
|
-
```json
|
|
134
|
-
"E1" : {
|
|
135
|
-
"E1P1" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
|
136
|
-
"F1P1": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
|
137
|
-
"F4P1" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
|
|
138
|
-
"F4P2.F2P1" : { "classification": "CustomerContent", "purpose": "PerformanceAndHealth" },
|
|
139
|
-
"F4P2.F3P1" : { "classification": "PublicPersonalData", "purpose": "FeatureInsight" },
|
|
140
|
-
"${wildcard}": [
|
|
141
|
-
{
|
|
142
|
-
"${prefix}": "timer.",
|
|
143
|
-
"${classification}": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"CP1" : { "endPoint": "SqmUserId", "classification": "EndUserPseudonymizedInformation", "purpose": "BusinessInsight" }
|
|
147
|
-
}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
# Syntax
|
|
151
|
-
All GDPR comments are tagged with one of the following tags and are otherwise well-formed `JSON`.
|
|
152
|
-
- `__GDPR__` - describes the name and the properties of a telemetry event
|
|
153
|
-
- `__GDPR__FRAGMENT__` - describes the name and the properties of a fragment of the data of an event, fragments are either included or inlined by other fragments or events
|
|
154
|
-
- `__GDPR__COMMON__` - describes a property added to every telemetry event
|
|
155
|
-
|
|
156
|
-
Each property is described with an object that looks like this:
|
|
157
|
-
```ts
|
|
158
|
-
{
|
|
159
|
-
endPoint?: "none" | "SqmUserId" | "SqmMachineId",
|
|
160
|
-
classification: "SystemMetaData" | "CustomerContent" | "EndUserPseudonymizedInformation" | "PublicPersonalData" | "PublicNonPersonalData" | "CallstackOrException",
|
|
161
|
-
purpose: "FeatureInsight" | "PerformanceAndHealth" | "BusinessInsight" | "SecurityAndAuditing",
|
|
162
|
-
owner: string,
|
|
163
|
-
comment: string,
|
|
164
|
-
expiration?: string,
|
|
165
|
-
isMeasurement?: Boolean
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
If `endPoint` is omitted, it defaults to `none`. That's appropriate for pretty much all properties rather than a couple of common properties.
|
|
170
|
-
|
|
171
|
-
The values for `classification` are mostly self-explaining. `EndUserPseudonymizedInformation` is what allows us to identify a particular user across time, although we don't know the actual identity of the user. `machineId` or `instanceId` fall in this category. `PublicPersonalData` and `PublicNonPersonalData` is information that users provide us with, for example, publisher information on the marketplace. `CustomerContent` is information the user generated such as urls of repositories or custom snippets. `CallstackOrException` is for error data like callbacks and exceptions. Everything else is `SystemMetaData`.
|
|
172
|
-
|
|
173
|
-
`purpose` is usually `FeatureInsight` or `PerformanceAndHealth`. We only use `BusinessInsight` for events generated by surveys.
|
|
174
|
-
|
|
175
|
-
`owner` is used to specify who is responsbile for the telemetry event.
|
|
176
|
-
|
|
177
|
-
`comment` is used to specify a reason for collecting the event. This is meant to be more descriptive than `classification` and `purpose`.
|
|
178
|
-
|
|
179
|
-
`expiration` is used if you would like to dictate the max product version this telemetry event should be sent in. This allows external tools to specify which events should be removed from the codebase.
|
|
180
|
-
|
|
181
|
-
`isMeasurement` is used if the property is a number. Numbers are handled differently in the telemetry system.
|
|
182
|
-
|
|
183
|
-
For an event with no properties, define an empty event:
|
|
184
|
-
```json
|
|
185
|
-
"event" : { }
|
|
186
|
-
```
|
|
187
|
-
This will be classified as `SystemMetadata` with a purpose of `FeatureInsight`.
|
|
188
|
-
|
|
189
|
-
## Special constructs
|
|
190
|
-
#### ${include}
|
|
191
|
-
If A includes B, this is equivalent to the union of A and B. Fragments are referenced using `${FragmentName}`.
|
|
192
|
-
|
|
193
|
-
#### ${inline}
|
|
194
|
-
If A inlines B at property P, all properties of B are added to A under the key `"P.<Name in B>"`. Fragments are referenced using `${FragmentName}`.
|
|
195
|
-
|
|
196
|
-
#### ${wildcard}
|
|
197
|
-
Wildcards can be used as a **temporary** workaround to describe dynamic properties that have a common prefix. In the long run all dynamic properties need to be removed and be sent as values of a static property. A wild card is an array of wildcard entries. Each entry has a `${prefix}` and a `${classification}` property. The value of `${prefix}` is a string representing the common prefix of all properties it matches. The value of `${classification}` is a property description detailed above.
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
# Using Typescript to annotate your Typescript Code
|
|
2
|
-
|
|
3
|
-
As shown in [GDPR formatted comments](comment-code-annotations.md) telemetry events can be documented in the form of hand written JSON comments.
|
|
4
|
-
This form of documentation has its pros and cons, one of the major cons which is human error. Comments do not offer any computer assisted protection agianst things like simple typos while typings do.
|
|
5
|
-
|
|
6
|
-
## Declaring your telemetry handler
|
|
7
|
-
We recommend declaring your telemetry handler the same way VS Code does as the parser explicity looks for a function called publicLog2 which is templated
|
|
8
|
-
and takes two types, the event and the classification.
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
interface IPropertyData {
|
|
12
|
-
classification: 'SystemMetaData' | 'CallstackOrException';
|
|
13
|
-
purpose: 'PerformanceAndHealth' | 'FeatureInsight';
|
|
14
|
-
owner: string;
|
|
15
|
-
comment: string;
|
|
16
|
-
expiration?: string;
|
|
17
|
-
endpoint?: string;
|
|
18
|
-
isMeasurement?: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface IGDPRProperty {
|
|
22
|
-
readonly [name: string] : IPropertyData | undefined | IGDPRProperty;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type ClassifiedEvent<T extends IGDPRProperty> = {
|
|
26
|
-
[k in keyof T]: any
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
type StrictPropertyCheck<TEvent, TClassifiedEvent, TError> = keyof TEvent extends keyof TClassifiedEvent ? keyof TClassifiedEvent extends keyof TEvent ? TEvent : TError : TError;
|
|
30
|
-
|
|
31
|
-
function publicLog2<E extends ClassifiedEvent<T> = never, T extends {[_ in keyof T]: IPropertyData | IGDPRProperty | undefined} = never>(name: string, props: StrictPropertyCheck<E, ClassifiedEvent<T>, 'Type of classified event does not match event properties'>) { }
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Simple Events
|
|
35
|
-
Previously the annotation for the event monacoworkbench/packagemetrics looked like this:
|
|
36
|
-
```ts
|
|
37
|
-
/* __GDPR__
|
|
38
|
-
"monacoworkbench/packagemetrics" : {
|
|
39
|
-
"commit" : {"classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
|
|
40
|
-
"size" : {"classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
|
|
41
|
-
"count" : {"classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
|
|
42
|
-
}
|
|
43
|
-
*/
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
With typescript annotations the event would be annotated like this:
|
|
47
|
-
```ts
|
|
48
|
-
type PackageMetricsClassification = {
|
|
49
|
-
commit: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' };
|
|
50
|
-
size: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' };
|
|
51
|
-
count: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' };
|
|
52
|
-
};
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
You would then need to declare a type for the event you're sending and send the event
|
|
56
|
-
|
|
57
|
-
```ts
|
|
58
|
-
interface PackageMetrics {
|
|
59
|
-
commit: string;
|
|
60
|
-
size: number;
|
|
61
|
-
count: number;
|
|
62
|
-
};
|
|
63
|
-
publicLog2<PackageMetrics, PackageMetricsClassification>('monacoworkbench/packagemetrics', packageMetric);
|
|
64
|
-
// Inline works too
|
|
65
|
-
publicLog2<PackageMetrics, PackageMetricsClassification>('monacoworkbench/packagemetrics', {commit: 'abcdef', size: 10, count: 1});
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
This form of annotation requires that the type of event sent and its classification match in terms of properties and that the classification is a valid classification.
|
|
69
|
-
|
|
70
|
-
## Includes
|
|
71
|
-
Includes were previously annotated like this:
|
|
72
|
-
```ts
|
|
73
|
-
/* __GDPR__FRAGMENT__
|
|
74
|
-
"TypeScriptCommonProperties" : {
|
|
75
|
-
"version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
|
76
|
-
}
|
|
77
|
-
*/
|
|
78
|
-
|
|
79
|
-
/* __GDPR__
|
|
80
|
-
"tsserver.exitWithCode" : {
|
|
81
|
-
"code" : { "classification": "CallstackOrException", "purpose": "PerformanceAndHealth" },
|
|
82
|
-
"${include}": [
|
|
83
|
-
"${TypeScriptCommonProperties}"
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
*/
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
With using typings as annotations an include is effectively the extends keyword or an intersect type. The typing annotation is as follows
|
|
90
|
-
|
|
91
|
-
```ts
|
|
92
|
-
type TypeScriptCommonPropertiesClassification = {
|
|
93
|
-
version: {classification: 'SystemMetaData', purpose: 'FeatureInsight'};
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// The intersect type signifies the include
|
|
97
|
-
type TSServeExitWithCodeClassification = {
|
|
98
|
-
code: {classification: 'CallstackOrException', purpose: 'PerformanceAndHealth'};
|
|
99
|
-
} & TypeScriptCommonPropertiesClassification;
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
The event is then given a type and sent just like the event above
|
|
103
|
-
```ts
|
|
104
|
-
interface TSServerExitCode {
|
|
105
|
-
code: number;
|
|
106
|
-
version: number;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
const tsServerEvent: TSServerExitCode = {
|
|
110
|
-
code: 0,
|
|
111
|
-
version: 3.5
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
publicLog2<TSServerExitCode, TSServeExitWithCodeClassification>('tsserver.exitWithCode', tsServerEvent);
|
|
115
|
-
publicLog2<TSServerExitCode, TSServeExitWithCodeClassification>('tsserver.exitWithCode', {code: 0, version: 3.5});
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
## Inlines
|
|
119
|
-
Inlines were previously annotated like so:
|
|
120
|
-
```ts
|
|
121
|
-
/* __GDPR__FRAGMENT__
|
|
122
|
-
"ExtensionIdentifier" : {
|
|
123
|
-
"id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
|
124
|
-
"uuid": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
|
125
|
-
}
|
|
126
|
-
*/
|
|
127
|
-
|
|
128
|
-
/* __GDPR__
|
|
129
|
-
"disableOtherKeymaps" : {
|
|
130
|
-
"newKeymap": { "${inline}": [ "${ExtensionIdentifier}" ] },
|
|
131
|
-
"oldKeymaps": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
|
132
|
-
"confirmed" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
|
133
|
-
}
|
|
134
|
-
*/
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Inlines can be thought of as composition and therefore can be defined as a type containing another type
|
|
138
|
-
|
|
139
|
-
```ts
|
|
140
|
-
type ExtensionIdentifierClassifcation = {
|
|
141
|
-
id: {classification: 'SystemMetaData', purpose: 'FeatureInsight'};
|
|
142
|
-
uuid: {classification: 'SystemMetaData', purpose: 'FeatureInsight'};
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
type DisableOtherKeymapsClassification = {
|
|
146
|
-
newKeyMap: ExtensionIdentifierClassifcation;
|
|
147
|
-
oldKeyMaps: {classification: 'SystemMetaData', purpose: 'FeatureInsight'};
|
|
148
|
-
confirmed: {classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true};
|
|
149
|
-
};
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
The process of defining and sending the event are the same as the previous two
|
|
153
|
-
|
|
154
|
-
```ts
|
|
155
|
-
interface ExtensionIdentifier {
|
|
156
|
-
id: number;
|
|
157
|
-
uuid: number;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
interface DisableOtherKeymaps {
|
|
161
|
-
newKeyMap: ExtensionIdentifier;
|
|
162
|
-
oldKeyMaps: string;
|
|
163
|
-
confirmed: boolean;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
const extensionIdentifierFragment: ExtensionIdentifier = {
|
|
167
|
-
id: 1,
|
|
168
|
-
uuid: 1234
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
const disableKeymapsEvent: DisableOtherKeymaps = {
|
|
172
|
-
newKeyMap: extensionIdentifierFragment,
|
|
173
|
-
oldKeyMaps: 'abcd',
|
|
174
|
-
confirmed: true
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
publicLog2<DisableOtherKeymaps, DisableOtherKeymapsClassification>('disableOtherKeymaps', disableKeymapsEvent);
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
## Currently Not Supported
|
|
181
|
-
|
|
182
|
-
* Wildcards
|
|
183
|
-
* Common Properties
|
|
184
|
-
* Anything else not defined above
|
|
185
|
-
|
|
186
|
-
To get around the not supported features we recommend annotating those with comments as the extractor will fall back on those provided no type annotations are provided.
|
|
187
|
-
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# Generate Telemetry JSON Files
|
|
2
|
-
|
|
3
|
-
The inventories will be generated as `json` files. They have the following basic structure:
|
|
4
|
-
```json
|
|
5
|
-
{
|
|
6
|
-
"events": {
|
|
7
|
-
"<eventName>": {
|
|
8
|
-
"<propertyName>": {
|
|
9
|
-
"classification": "SystemMetaData",
|
|
10
|
-
"purpose": "FeatureInsight",
|
|
11
|
-
"endPoint": "none"
|
|
12
|
-
},
|
|
13
|
-
"<propertyName>": {
|
|
14
|
-
"classification": "SystemMetaData",
|
|
15
|
-
"purpose": "PerformanceAndHealth",
|
|
16
|
-
"isMeasurement": true,
|
|
17
|
-
"endPoint": "none"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
...
|
|
21
|
-
},
|
|
22
|
-
"commonProperties": {
|
|
23
|
-
"<commonPropertyName>": {
|
|
24
|
-
"classification": "SystemMetaData",
|
|
25
|
-
"purpose": "FeatureInsight",
|
|
26
|
-
"endPoint": "none"
|
|
27
|
-
},
|
|
28
|
-
...
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Note: If the code annotations have syntax errors, the inventory generation will fail.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## Viewing what the command has to offer
|
|
37
|
-
```bash
|
|
38
|
-
vscode-telemetry-extractor --help
|
|
39
|
-
Allows the extraction of telemetry annotation from code. For more details please read: https://github.com/microsoft/vscode-telemetry-extractor/blob/master/README.md
|
|
40
|
-
|
|
41
|
-
-s --sourceDir The folder which you want to extract telemetry from
|
|
42
|
-
-x --excludedDir A subdirectory which you would like to exclude from the extraction
|
|
43
|
-
-c --config A JSON Configuration file containing extraction details
|
|
44
|
-
-o --outputDir The directory which you would like the outputted JSON file to be placed in
|
|
45
|
-
-p --eventPrefix The string you wish to prepend to every telemetry event.
|
|
46
|
-
-f --fileName The name of the file you want to output.
|
|
47
|
-
-h --help Displays the help dialog which provides more information on how to use the tool
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Extracting telemetry events
|
|
51
|
-
To extract telemetry events from your code you must provide a source directory and output directory.
|
|
52
|
-
The source directory is the folder containing the code which you wish to extract the events. The output directory is the location which the resulting JSON report will be placed.
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
vscode-telemetry-extractor -s PATH_TO_YOUR_CODE -o PATH_TO_PLACE_JSON
|
|
56
|
-
```
|
|
57
|
-
This will generate output similar to:
|
|
58
|
-
```bash
|
|
59
|
-
....running.
|
|
60
|
-
...extracting
|
|
61
|
-
...writing <OUTPUTDIR>/declarations-resolved.json
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Using a config file
|
|
65
|
-
The extractor also supports config files which can be passed in via a command line arguments to customize the way the tool parses.
|
|
66
|
-
An example config file can be found below. Note: `sourceDirs` and `excludedDirs` must be made relative to the `workingDir`
|
|
67
|
-
```json
|
|
68
|
-
[
|
|
69
|
-
{
|
|
70
|
-
"eventPrefix": "typescript-language-features/",
|
|
71
|
-
"workingDir": "/Users/lramos/vscode-telemetry-extractor/src/telemetry-sources",
|
|
72
|
-
"sourceDirs": [
|
|
73
|
-
"vscode/extensions/typescript-language-features",
|
|
74
|
-
"Typescript"
|
|
75
|
-
],
|
|
76
|
-
"excludedDirs": [],
|
|
77
|
-
"applyEndpoints": true
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"eventPrefix": "msjsdiag.chrome/",
|
|
81
|
-
"workingDir": "/Users/lramos/vscode-telemetry-extractor/src/telemetry-sources",
|
|
82
|
-
"sourceDirs": [
|
|
83
|
-
"vscode-chrome-debug-core",
|
|
84
|
-
"vscode-chrome-debug"
|
|
85
|
-
],
|
|
86
|
-
"excludedDirs": [],
|
|
87
|
-
"applyEndpoints": true,
|
|
88
|
-
"lowerCaseEvents": true
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Some defaults:
|
|
94
|
-
1. If no working directory is provided it will use your current working directory
|
|
95
|
-
2. `excludedDirs` defaults to an empty array
|
|
96
|
-
3. If the working directory provided is relative it must be relative to the current working directory
|
|
97
|
-
|
|
98
|
-
# Other Functionalities
|
|
99
|
-
|
|
100
|
-
## Running Tests
|
|
101
|
-
|
|
102
|
-
If you wish to make contributions to this tool, a few tests are provided to ensure there are no regressions. We also urge that you
|
|
103
|
-
add tests to ensure that any code you add doesn't break as well.
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
npm run test
|
|
107
|
-
```
|