aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.51k stars 436 forks source link

telemetry: Add `sessionId` to metrics #5510

Closed nkomonen-amazon closed 2 months ago

nkomonen-amazon commented 2 months ago

Do not merge until service changes are live

Problem:

I have filtered all the metrics in Kibana by clientId: "XXXXXX", but if they had multiple IDE windows opened at the same time sending metrics I cannot know which window they are coming from since they share the same clientID.

Solution:

This adds a new field to the telemetry service called sessionId which uniquely identifies a part of the UI in an IDE window. It is adjacent to clientId.

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

Implementation Details:

Changes in the Telemetry service need to be merged before this change can since they update the endpoint to accept this new field.

The updates of this commit only mirror the upstream, so this process is manual.


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

hayemaxi commented 2 months ago

How is sessionId generated and sent? Will there be code changes to generate this sessionId later, like how we generate clientId?

nkomonen-amazon commented 2 months ago

@hayemaxi see the new changes that actually send a sessionID