-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
telemetry(amazonq): measure e2e latency for amazon q requests #5566
Conversation
This pull request modifies files in src/ but no tests were added/updated. Confirm whether tests should be added or ensure the PR description explains why tests are not required. |
|
||
// A common interface over existing chat session storages | ||
// TODO align all the chatsessionstorages so we don't have to do this :/ | ||
export class ChatSessionStorageFacade { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
packages/core/src/amazonq/webview/messages/messageDispatcher.ts
Outdated
Show resolved
Hide resolved
packages/core/src/amazonq/webview/messages/messageDispatcher.ts
Outdated
Show resolved
Hide resolved
I think another way we could possible go is to just instrument everything via a traceId which is more traditional for distributed tracing (rather than connecting tabIds to conversation Ids at the end of a flow like we do here). I think this might be more scalable for codewhisperer inline as well. on chat prompt we could create a trace id, plumb that through the entire system and store various different timings in the RecordMap. This would remove:
we would keep:
end result:
|
6ea7da1
to
22db33e
Compare
68658f1
to
f237a6c
Compare
Problem: - We can't measure e2e how long a chat request takes Solution: - Plumb the trace id through to the webview -> vscode -> webview. This allows us to know exactly what is happening to a message and how long everything took to get there - chat e2e latency can be linked with the other telemetry events via the traceId
f237a6c
to
e7bd8a0
Compare
This pull request modifies code in src/ but no tests were added/updated. Confirm whether tests should be added or ensure the PR description explains why tests are not required. |
Problem:
Solution:
Previous PR description
Problem
This is just a draft of what we could potentially do to measure e2e latency in amazon q chat message requests. Feel free to leave comments on the PR
Main code level problems:
Solution
This PR does a couple things:
Sample event when sending a request in amazon q chat:
You can also get events from the right click context menu items as well (explain, refactor, etc)
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.