Skip to content

telemetry(amazonq): history character count #1018

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chungjac
Copy link
Contributor

@chungjac chungjac commented Apr 18, 2025

Problem

  • There are user messages (prompt) and assistant response messages (answer). Some prompts will contain toolResults, and a some answers will contain toolUses. All of these combined make up the history
  • we want to keep track of the number of characters for each message in the history to help us optimize the prompt caching strategy

Solution

  • add amazonq_addMessageHistory metric

License

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

@chungjac chungjac requested a review from a team as a code owner April 18, 2025 18:12
@chungjac chungjac force-pushed the historyCharCount branch 2 times, most recently from f5faf4f to c578860 Compare April 18, 2025 19:10
@chungjac chungjac marked this pull request as draft April 18, 2025 21:18
@chungjac chungjac force-pushed the historyCharCount branch 2 times, most recently from e746975 to 91cd8c6 Compare April 18, 2025 21:38
@chungjac chungjac marked this pull request as ready for review April 18, 2025 21:52
@@ -1096,6 +1096,11 @@
"type": "boolean",
"description": "True if the code snippet that user interacts with has a reference."
},
{
"name": "cwsprChatHistoryMessageCharacterCount",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you drop this word "history" from the name and description here? It is just the character count of a message.

@chungjac chungjac marked this pull request as draft April 22, 2025 20:31
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.

2 participants