diff --git a/telemetry/definitions/commonDefinitions.json b/telemetry/definitions/commonDefinitions.json index 5b074f308..1fb913234 100644 --- a/telemetry/definitions/commonDefinitions.json +++ b/telemetry/definitions/commonDefinitions.json @@ -1782,7 +1782,7 @@ { "name": "source", "type": "string", - "description": "The source of the operation" + "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." }, { "name": "sourceFacetType", diff --git a/telemetry/vscode/src/generate.ts b/telemetry/vscode/src/generate.ts index 3a3b2abd7..f811291f2 100644 --- a/telemetry/vscode/src/generate.ts +++ b/telemetry/vscode/src/generate.ts @@ -136,6 +136,7 @@ const commonMetadata = [ 'requestId', 'requestServiceType', 'result', + 'source', ] as const /** diff --git a/telemetry/vscode/test/resources/generatorOutput.ts b/telemetry/vscode/test/resources/generatorOutput.ts index 5ed19bd36..289ce0024 100644 --- a/telemetry/vscode/test/resources/generatorOutput.ts +++ b/telemetry/vscode/test/resources/generatorOutput.ts @@ -30,6 +30,8 @@ export interface MetricBase { readonly requestServiceType?: string /** The result of the operation */ readonly result?: Result + /** 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. */ + readonly source?: string /** A flag indicating that the metric was not caused by the user. */ readonly passive?: boolean /** @deprecated Arbitrary "value" of the metric. */ diff --git a/telemetry/vscode/test/resources/generatorOverrideOutput.ts b/telemetry/vscode/test/resources/generatorOverrideOutput.ts index 18a297141..ad39b3362 100644 --- a/telemetry/vscode/test/resources/generatorOverrideOutput.ts +++ b/telemetry/vscode/test/resources/generatorOverrideOutput.ts @@ -30,6 +30,8 @@ export interface MetricBase { readonly requestServiceType?: string /** The result of the operation */ readonly result?: Result + /** 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. */ + readonly source?: string /** A flag indicating that the metric was not caused by the user. */ readonly passive?: boolean /** @deprecated Arbitrary "value" of the metric. */