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

Amazon Q Code Transform: Improve telemetry to capture transform journey #4731

Merged
merged 9 commits into from
Jul 29, 2024

Conversation

tincheng
Copy link
Contributor

@tincheng tincheng commented Jul 26, 2024

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Emit new metrics to better capture user journey for Amazon Q Code Transform.
Remove deprecated metrics.

New metrics published:

// initiate transform
DefaultMetricEvent(createTime=2024-07-25T23:31:20.681730Z, awsAccount=n/a, awsRegion=n/a, awsProduct=Amazon Q For JetBrains, awsVersion=3.19-SNAPSHOT-233+c0e7ddc.modified, data=[DefaultDatum(name=codeTransform_initiateTransform, value=1.0, unit=None, passive=false, metadata={result=Succeeded, credentialSourceId=iamIdentityCenter, codeTransformSessionId=dd5054d6-35b2-42bd-84fe-8959a57b38c8})])

// validate project
DefaultMetricEvent(createTime=2024-07-25T23:31:22.693252Z, awsAccount=n/a, awsRegion=n/a, awsProduct=Amazon Q For JetBrains, awsVersion=3.19-SNAPSHOT-233+c0e7ddc.modified, data=[DefaultDatum(name=codeTransform_validateProject, value=1.0, unit=None, passive=false, metadata={result=Succeeded, codeTransformLocalJavaVersion=JDK_1_8, buildSystemVersion=Bundled (Maven 3), codeTransformSessionId=dd5054d6-35b2-42bd-84fe-8959a57b38c8, codeTransformBuildSystem=Maven})])

// user submits selection
DefaultMetricEvent(createTime=2024-07-25T23:31:27.925320Z, awsAccount=n/a, awsRegion=n/a, awsProduct=Amazon Q For JetBrains, awsVersion=3.19-SNAPSHOT-233+c0e7ddc.modified, data=[DefaultDatum(name=codeTransform_submitSelection, value=1.0, unit=None, passive=false, metadata={result=Succeeded, userChoice=Confirm, codeTransformJavaSourceVersionsAllowed=JDK_1_8, codeTransformJavaTargetVersionsAllowed=JDK_17, codeTransformProjectId=8sKfQJq2MR72O4GEbFHE8HUAIV/zrqmQRvj/KTCGBtM=, codeTransformSessionId=dd5054d6-35b2-42bd-84fe-8959a57b38c8})])

// build project locally
DefaultMetricEvent(createTime=2024-07-25T23:31:43.864113Z, awsAccount=n/a, awsRegion=n/a, awsProduct=Amazon Q For JetBrains, awsVersion=3.19-SNAPSHOT-233+c0e7ddc.modified, data=[DefaultDatum(name=codeTransform_localBuildProject, value=1.0, unit=None, passive=false, metadata={result=Succeeded, codeTransformBuildCommand=IDEBundledMaven, codeTransformSessionId=dd5054d6-35b2-42bd-84fe-8959a57b38c8})])

// upload project
DefaultMetricEvent(createTime=2024-07-25T23:32:00.554623Z, awsAccount=n/a, awsRegion=n/a, awsProduct=Amazon Q For JetBrains, awsVersion=3.19-SNAPSHOT-233+c0e7ddc.modified, data=[DefaultDatum(name=codeTransform_uploadProject, value=1.0, unit=None, passive=false, metadata={result=Succeeded, codeTransformTotalByteSize=10806548, codeTransformRunTimeLatency=16624, codeTransformDependenciesCopied=true, codeTransformSessionId=dd5054d6-35b2-42bd-84fe-8959a57b38c8})])

// start job
DefaultMetricEvent(createTime=2024-07-25T23:35:46.403011Z, awsAccount=n/a, awsRegion=n/a, awsProduct=Amazon Q For JetBrains, awsVersion=3.19-SNAPSHOT-233+c0e7ddc.modified, data=[DefaultDatum(name=codeTransform_jobStart, value=1.0, unit=None, passive=false, metadata={result=Succeeded, codeTransformRunTimeLatency=18336, codeTransformJobId=a19bf628-31df-4085-ae4c-4a736da7ae13, codeTransformSessionId=f37233f4-74fe-4e01-8c2d-f91315d95d0c})])

// download result
DefaultMetricEvent(createTime=2024-07-25T23:45:01.364038Z, awsAccount=n/a, awsRegion=n/a, awsProduct=Amazon Q For JetBrains, awsVersion=3.19-SNAPSHOT-233+c0e7ddc.modified, data=[DefaultDatum(name=codeTransform_downloadArtifact, value=1.0, unit=None, passive=false, metadata={result=Succeeded, codeTransformTotalByteSize=360556, codeTransformRunTimeLatency=3391, codeTransformJobId=9688af04-e36a-41e8-b980-0e5298ebb7d6, codeTransformSessionId=fb8d0a93-4981-4baa-b721-bc683b2a8be1, codeTransformArtifactType=ClientInstructions})])

// view result
DefaultMetricEvent(createTime=2024-07-25T23:45:13.256535Z, awsAccount=n/a, awsRegion=n/a, awsProduct=Amazon Q For JetBrains, awsVersion=3.19-SNAPSHOT-233+c0e7ddc.modified, data=[DefaultDatum(name=codeTransform_viewArtifact, value=1.0, unit=None, passive=false, metadata={result=Succeeded, userChoice=Cancel, codeTransformStatus=COMPLETED, codeTransformJobId=9688af04-e36a-41e8-b980-0e5298ebb7d6, codeTransformSessionId=fb8d0a93-4981-4baa-b721-bc683b2a8be1, codeTransformVCSViewerSrcComponents=toastNotification, codeTransformArtifactType=ClientInstructions})])

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

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

@tincheng tincheng requested review from a team as code owners July 26, 2024 00:17
@tincheng tincheng changed the title Amazon Q Code Transform: Improve telemetry Amazon Q Code Transform: Revamp telemetry Jul 26, 2024
@tincheng tincheng changed the title Amazon Q Code Transform: Revamp telemetry Amazon Q Code Transform: Improve telemetry to capture transform journey Jul 26, 2024
CodeTransformPreValidationError.NonMavenProject,
if (isGradleProject(project)) "Gradle build" else "other build"
)
),
buildSystem = if (isGradleProject(project)) CodeTransformBuildSystem.Gradle else CodeTransformBuildSystem.Unknown
Copy link
Contributor

Choose a reason for hiding this comment

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

Right now this isGradleProject() is just used for telemetry right? Looks like it's implemented here:

fun isGradleProject(project: Project) = !GradleSettings.getInstance(project).linkedProjectsSettings.isEmpty()

Copy link
Contributor Author

@tincheng tincheng Jul 29, 2024

Choose a reason for hiding this comment

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

yes - It's just for telemetry and it's using the function from the util.

@tincheng
Copy link
Contributor Author

Instead of removing the deprecated metrics, I should keep them for short term backward compatibility for BI analysis purpose. I will add them back, and remove them after BI team confirms no longer needing the old metrics.

@tincheng tincheng enabled auto-merge (squash) July 29, 2024 18:28
@tincheng tincheng merged commit e85fb8a into aws:main Jul 29, 2024
9 of 12 checks passed
@tincheng tincheng deleted the metrics branch July 29, 2024 19:20
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