Skip to content

Commit f581d2c

Browse files
author
David Hasani
committed
telemetry(amazonq): emit more metrics for code transformation
1 parent 99099c4 commit f581d2c

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

packages/core/src/codewhisperer/models/model.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -414,18 +414,8 @@ export class TransformByQState {
414414
private sourceServerName: string = ''
415415

416416
private metadataPathSQL: string = ''
417-
private linesOfCodeSubmitted: number | undefined = undefined
418-
private sourceDB: DB | undefined = undefined
419-
420-
private targetDB: DB | undefined = undefined
421-
422-
private schema: string = ''
423417

424-
private schemaOptions: Set<string> = new Set()
425-
426-
private sourceServerName: string = ''
427-
428-
private metadataPathSQL: string = ''
418+
private linesOfCodeSubmitted: number | undefined = undefined
429419

430420
private planFilePath: string = ''
431421
private summaryFilePath: string = ''

packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -408,19 +408,14 @@ export class ProposedTransformationExplorer {
408408
const metricsPath = path.join(pathContainingArchive, ExportResultArchiveStructure.PathToMetrics)
409409
const metricsData = JSON.parse(fs.readFileSync(metricsPath, 'utf8'))
410410

411-
console.log('locChanged = ', metricsData.linesOfCodeChanged)
412-
console.log('charsChanged = ', metricsData.charsOfCodeChanged)
413-
console.log('linesSubmitted = ', transformByQState.getLinesOfCodeSubmitted())
414-
415-
// TO-DO: add support for SQL conversions; right now these metrics are only available for Java upgrades
416-
await codeWhisperer.codeWhispererClient.sendTelemetryEvent({
411+
codeWhisperer.codeWhispererClient.sendTelemetryEvent({
417412
telemetryEvent: {
418413
transformEvent: {
419414
jobId: transformByQState.getJobId(),
420415
timestamp: new Date(),
421416
ideCategory: 'VSCODE',
422417
programmingLanguage: {
423-
languageName: 'JAVA',
418+
languageName: 'JAVA', // TO-DO: use transformByQState.getTransformationType() to tell if JAVA or SQL
424419
},
425420
linesOfCodeChanged: metricsData.linesOfCodeChanged,
426421
charsOfCodeChanged: metricsData.charsOfCodeChanged,

0 commit comments

Comments
 (0)