Skip to content
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): add telemetry for code generated and code accepted #6034

Merged
merged 13 commits into from
Nov 19, 2024

Conversation

kelvin-klchu
Copy link
Contributor

Problem

  • we need to define a way to measure code generated and code accepted from /dev feature

Solution

  • we compute the char and line difference between the two files
  • all generated codes are immediately reported in telemetry
  • within the same session, de-duplication is done to avoid reporting the exact same changes twice across different code gen iterations
  • currently, only accepted changes with new lines added will be reported

Special Note

charsAdded and charRemoved may be slightly different from the count you manually get from the IDE.
The reason is because new line character \n is not counted here in the computeDiff method.


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

@kelvin-klchu kelvin-klchu requested review from a team as code owners November 15, 2024 21:32
@kelvin-klchu kelvin-klchu force-pushed the telemetry/measure-lines-of-code branch from f6e8bbc to 592c736 Compare November 19, 2024 18:06
@kelvin-klchu
Copy link
Contributor Author

rebase changes and resolved conflicts

@jpinkney-aws jpinkney-aws merged commit 5f012c8 into aws:master Nov 19, 2024
23 of 25 checks passed
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.

3 participants