Skip to content

feat: adding inline chat telemetry - #2001

Merged
suprajaven merged 2 commits into
Amazon-Q-Developer:mainfrom
suprajaven:telemetrymetrics
Jul 30, 2025
Merged

feat: adding inline chat telemetry#2001
suprajaven merged 2 commits into
Amazon-Q-Developer:mainfrom
suprajaven:telemetrymetrics

Conversation

@suprajaven

Copy link
Copy Markdown
Contributor

Problem

  • Adding some explicit telemetry to the inline chat for the send message chat features.

Solution

  • Extended and added telemetry around the latency, followed similar pattern as that of inline completions in emitting the needed telemetry

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter

codecov-commenter commented Jul 29, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.09524% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.10%. Comparing base (905f0fc) to head (ad53cae).
⚠️ Report is 356 commits behind head on main.

Files with missing lines Patch % Lines
...isperer/src/language-server/chat/chatController.ts 63.09% 30 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2001      +/-   ##
==========================================
+ Coverage   61.03%   61.10%   +0.06%     
==========================================
  Files         239      239              
  Lines       52155    52232      +77     
  Branches     3117     3135      +18     
==========================================
+ Hits        31835    31916      +81     
+ Misses      20261    20256       -5     
- Partials       59       60       +1     
Flag Coverage Δ
unittests 61.10% <63.09%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@suprajaven
suprajaven marked this pull request as ready for review July 29, 2025 12:17
@suprajaven
suprajaven requested a review from a team as a code owner July 29, 2025 12:17
this.#inlineChatLanguage = triggerContext.programmingLanguage?.languageName
this.#inlineChatTriggerType = ChatTriggerType.MANUAL
this.#inlineChatCustomizationArn = this.#customizationArn
this.#inlineChatRequestLength = params.prompt?.prompt?.length ?? 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.#inlineChatRequestLength = params.prompt?.prompt?.length ?? 0
this.#inlineChatRequestPromptLength = params.prompt?.prompt?.length ?? 0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, if no other major comments I shall retain this behaviour - If others popup, I shall update this in the next followup commit.


this.#log('Response for inline chat', JSON.stringify(response.$metadata), JSON.stringify(response))
} catch (err) {
this.#log(`Inline Chat Service Invocation Failed: ${err instanceof Error ? err.message : 'unknown'}`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add failed invocation metrics as well? Would be useful as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

@suprajaven
suprajaven merged commit 8b1c9c7 into Amazon-Q-Developer:main Jul 30, 2025
6 checks passed
@suprajaven
suprajaven deleted the telemetrymetrics branch July 30, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants