Skip to content

Commit

Permalink
feat: Add viewId common definition type
Browse files Browse the repository at this point in the history
This adds a new type called `viewId` which uniquely identifies
a part of the UI in an IDE window.

The `viewId` should be a comma delimited string where each item
appended is a more specific part of the UI within the previous
item.

The top level (first item) part of the string should be an identifier
for the specific IDE window, as it is possible to have multiple windows
of the same IDE opened at the same time. Then if there is a specific
view within that specific IDE window you would append its identifier.

Example:

- I have 2 VS Code windows with IDs: `abc-123` and `xyz-789`
- My Amazon Q chat view has an ID `amazonq-chat`
- Result `viewId`: `abc-123,amazonq-chat` and `xyz-789,amazonq-chat`

Now in my metrics I will be able to differentiate metrics by their viewId
since they both share the same clientId by design.

Signed-off-by: Nikolas Komonen <nkomonen@amazon.com>
  • Loading branch information
nkomonen-amazon committed Aug 26, 2024
1 parent cfc676d commit 988f4c0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,11 @@
"type": "string",
"description": "A generic version metadata"
},
{
"name": "viewId",
"type": "string",
"description": "Identifies a unique IDE window or sub-view within that unique IDE window. The value should be a comma delimited string where each item is a more specific view within the parent."
},
{
"name": "workflowToken",
"type": "string",
Expand Down
1 change: 1 addition & 0 deletions telemetry/vscode/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const commonMetadata = [
'requestId',
'requestServiceType',
'result',
'viewId'
] as const

/**
Expand Down

0 comments on commit 988f4c0

Please sign in to comment.