Skip to content

Commit

Permalink
fix(telemetry): bump toolkit telemetry generator version (aws#5450)
Browse files Browse the repository at this point in the history
* bump toolkit telemetry version

* patch

* patch

* patch lock file

* fix test compile error

* use 0 instead of -1 as the default value before we figureout the modified character length
  • Loading branch information
Will-ShaoHua authored Aug 14, 2024
1 parent 0d49535 commit cfc6099
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ describe('codewhispererTracker', function () {
codewhispererLanguage: 'java',
credentialStartUrl: testStartUrl,
codewhispererUserGroup: 'CrossFile',
codewhispererCharactersAccepted: suggestion.originalString.length,
codewhispererCharactersModified: 0,
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4044,7 +4044,7 @@
},
"devDependencies": {
"@aws-sdk/types": "^3.13.1",
"@aws-toolkits/telemetry": "^1.0.216",
"@aws-toolkits/telemetry": "^1.0.236",
"@aws/fully-qualified-names": "^2.1.4",
"@cspotcode/source-map-support": "^0.8.1",
"@sinonjs/fake-timers": "^10.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export class HumanInTheLoopManager {
codeTransformJobId: transformByQState.getJobId(),
result: MetadataResult.Fail,
reason: errorMessage,
codeTransformApiErrorMessage: errorMessage,
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ export async function zipCode({ dependenciesFolder, humanInTheLoopFlag, modulePa
} catch (e: any) {
telemetry.codeTransform_logGeneralError.emit({
codeTransformSessionId: CodeTransformTelemetryState.instance.getSessionId(),
codeTransformApiErrorMessage: 'Failed to zip project',
result: MetadataResult.Fail,
reason: 'ZipCreationFailed',
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ export class CodeWhispererTracker {
codewhispererLanguage: suggestion.language,
credentialStartUrl: AuthUtil.instance.startUrl,
codewhispererUserGroup: CodeWhispererUserGroupSettings.getUserGroup().toString(),
codewhispererCharactersAccepted: suggestion.originalString.length,
codewhispererCharactersModified: 0, // TODO: currently we don't have an accurate number for this field with existing implementation
})
// TODO:
// Temperary comment out user modification event, need further discussion on how to calculate this metric
Expand Down

0 comments on commit cfc6099

Please sign in to comment.