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): emit TransformEvent metric from download ZIP #5905

Merged
merged 14 commits into from
Nov 13, 2024

Conversation

dhasani23
Copy link
Contributor

Problem

Need some more metrics emitted to capture lines of code submitted, lines of code changed, and characters of code changed.

Solution

Emit said metrics after parsing them from the download ZIP.


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

@dhasani23 dhasani23 requested review from a team as code owners October 30, 2024 19:22
@dhasani23 dhasani23 marked this pull request as draft October 30, 2024 19:22
Copy link

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.

Copy link

  • 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.

@dhasani23 dhasani23 force-pushed the metrics branch 2 times, most recently from d328ee5 to b840289 Compare November 1, 2024 21:54
@dhasani23 dhasani23 marked this pull request as ready for review November 7, 2024 17:57
transformEvent: {
jobId: transformByQState.getJobId(),
timestamp: new Date(),
ideCategory: 'VSCODE',
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any constant value we can extract this VSCODE value from? Same for JAVA and SQL below

Copy link
Contributor

@fangwade007 fangwade007 Nov 13, 2024

Choose a reason for hiding this comment

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

+1, do we have enum e.g. IdeCategory or constants represent IDE or get it from IDE env ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see this no. All other uses in toolkit seem to use VSCODE just like this

Copy link
Contributor

@carolabadeer carolabadeer left a comment

Choose a reason for hiding this comment

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

Looks good to me. Will approve after console.log statements are replaced with logs

@dhasani23 dhasani23 force-pushed the metrics branch 2 times, most recently from f83e441 to 18b6adb Compare November 9, 2024 00:41
David Hasani and others added 11 commits November 13, 2024 08:16
QCT wants to support converting embedded SQL in Java apps.

Allow users to start a transformation for SQL conversions.

---

<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->

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

---------

Co-authored-by: David Hasani <[email protected]>
@dhasani23 dhasani23 changed the title telemetry(amazonq): emit more metrics for code transformation telemetry(amazonq): emit TransformEvent metric from download ZIP Nov 13, 2024
userContext: {
ideCategory: 'VSCODE',
operatingSystem: getOperatingSystem(),
product: 'CodeWhisperer',
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be AmazonQ ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep that makes more sense

Copy link
Contributor Author

@dhasani23 dhasani23 Nov 13, 2024

Choose a reason for hiding this comment

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

On second thought, I shouldn't even be manually including this userContext here — it's already included in the request, so we should simply use that:

@justinmk3 justinmk3 merged commit e835b6c into aws:master Nov 13, 2024
24 of 25 checks passed
@dhasani23 dhasani23 deleted the metrics branch December 21, 2024 07:44
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