You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Problem:
The `source` value has become a common pattern in our telemetry which
answers "who" caused the metric event. For example if we had a
function() to open a menu, there could be many different entrypoints
that could call it.
Right now we have to add `source` to each metric that uses it, but this
usage has increased for a lot of metrics.
## Solution:
- `source` will be a part of all metrics as an optional field.
- This has only been implemented for VSC.
## TODO
The other IDEs should consider following this pattern if not already.
**If all IDEs implement this then we can remove the explicit
requirements of `source` in `commonDefinitions.json`**
<!---
REMINDER:
- Read CONTRIBUTING.md first.
- Add test coverage for your changes.
- Link to related issues/commits.
- Testing: how did you test your changes?
- Screenshots if applicable
-->
## License
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
Signed-off-by: nkomonen-amazon <[email protected]>
Copy file name to clipboardExpand all lines: telemetry/definitions/commonDefinitions.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1782,7 +1782,7 @@
1782
1782
{
1783
1783
"name": "source",
1784
1784
"type": "string",
1785
-
"description": "The source of the operation"
1785
+
"description": "The source of the operation. This answers 'who' caused/triggered the operation. Example: did an Auth signout happen because of some expiration or since the user explicitly clicked the signout button."
Copy file name to clipboardExpand all lines: telemetry/vscode/test/resources/generatorOutput.ts
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,8 @@ export interface MetricBase {
30
30
readonlyrequestServiceType?: string
31
31
/** The result of the operation */
32
32
readonlyresult?: Result
33
+
/** The source of the operation. This answers 'who' caused/triggered the operation. Example: did an Auth signout happen because of some expiration or since the user explicitly clicked the signout button. */
34
+
readonlysource?: string
33
35
/** A flag indicating that the metric was not caused by the user. */
34
36
readonlypassive?: boolean
35
37
/** @deprecated Arbitrary "value" of the metric. */
Copy file name to clipboardExpand all lines: telemetry/vscode/test/resources/generatorOverrideOutput.ts
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,8 @@ export interface MetricBase {
30
30
readonlyrequestServiceType?: string
31
31
/** The result of the operation */
32
32
readonlyresult?: Result
33
+
/** The source of the operation. This answers 'who' caused/triggered the operation. Example: did an Auth signout happen because of some expiration or since the user explicitly clicked the signout button. */
34
+
readonlysource?: string
33
35
/** A flag indicating that the metric was not caused by the user. */
34
36
readonlypassive?: boolean
35
37
/** @deprecated Arbitrary "value" of the metric. */
0 commit comments