-
Notifications
You must be signed in to change notification settings - Fork 746
telemetry(amazonq): implement codewhisperer_clientComponentLatency #7234
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): implement codewhisperer_clientComponentLatency #7234
Conversation
|
opieter-aws
left a comment
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.
Looks like some unit tests need updating with these changes
| TelemetryHelper.instance.setSdkApiCallStartTime() | ||
|
|
||
| // Handle first request | ||
| const firstResult: InlineCompletionListWithReferences = await languageClient.sendRequest( |
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.
unrelated to work here, but do we need to encrypt this request?
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.
🤔 good question, I guess I probably should
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.
I'm asking internally for more clarification, but judging from the types it looks like inline can't be encrypted
|
|
||
| // Set telemetry data for the first response | ||
| TelemetryHelper.instance.setSdkApiCallEndTime() | ||
| TelemetryHelper.instance.setFirstResponseRequestId(firstResult.sessionId) |
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.
was this requestId intended to be for the backend request? Based on my understanding from here it sounds like sessionId is something else?
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.
Oh true, I might have to update it to be the first recommendation id
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.
AFAICT itemId might be the one we're looking for?
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.
I wouldn't be surprised if this information isn't part of the response since I haven't seen the backend requestID included in any Flare responses so far. This might mean some of this telemetry will need to live in flare or we sacrifice having requestId for now.
This issue of Flare having some telemetry fields, and the IDE having others is becoming increasingly problematic but there's no time/bandwidth for someone to look into it atm. :(
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.
Almost all of the telemetry for amazon q now lives on the flare side and will have access to that request id, I think this is the rare exception because it's purely tracking client side latency
708b841 to
363779d
Compare
70c2505 to
cd82ada
Compare
Problem
the only metric it looks like we're missing for inline on the vscode side is
codewhisperer_clientComponentLatencySolution
codewhisperer_clientComponentLatency uses a very similar implementation as before the only differences are:
example metric now:
feature/xbranches will not be squash-merged at release time.