Skip to content

Commit 9d754e0

Browse files
authored
Add new code transform metric fields and metric type for ApplyChanges (#797)
Updates `commonDefinitions.json` with some new fields used in existing `codeTransform` metric types, as well as a new metric type called `codeTransform_applyChanges` that is emitted whenever a user chooses to apply suggested changes.
1 parent 21a2606 commit 9d754e0

File tree

1 file changed

+60
-26
lines changed

1 file changed

+60
-26
lines changed

telemetry/definitions/commonDefinitions.json

Lines changed: 60 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,6 @@
248248
"type": "int",
249249
"description": "Time taken to invoke code scan service APIs in milliseconds"
250250
},
251-
{
252-
"name": "codeTransformApiErrorMessage",
253-
"type": "string",
254-
"description": "Any API-specific errors"
255-
},
256251
{
257252
"name": "codeTransformApiNames",
258253
"type": "string",
@@ -371,6 +366,21 @@
371366
"type": "int",
372367
"description": "The number of projects selected for transformation"
373368
},
369+
{
370+
"name": "codeTransformNumberOfTransformedFiles",
371+
"type": "int",
372+
"description": "The number of files that were transformed during a transformation job"
373+
},
374+
{
375+
"name": "codeTransformNumberOfTransformedFilesAccepted",
376+
"type": "int",
377+
"description": "The number of transformed files that have been accepted by the user"
378+
},
379+
{
380+
"name": "codeTransformNumberOfTransformedUnitsAccepted",
381+
"type": "int",
382+
"description": "The number of transformed buildable units that have been accepted by the user"
383+
},
374384
{
375385
"name": "codeTransformPatchViewerCancelSrcComponents",
376386
"type": "string",
@@ -1515,7 +1525,10 @@
15151525
{
15161526
"name": "saveType",
15171527
"type": "string",
1518-
"allowedValues": ["MANUAL_SAVE", "AUTO_SAVE"],
1528+
"allowedValues": [
1529+
"MANUAL_SAVE",
1530+
"AUTO_SAVE"
1531+
],
15191532
"description": "Type of save executed"
15201533
},
15211534
{
@@ -3473,6 +3486,24 @@
34733486
],
34743487
"passive": true
34753488
},
3489+
{
3490+
"name": "codeTransform_applyChanges",
3491+
"description": "Apply suggested changes to buildable units.",
3492+
"metadata": [
3493+
{
3494+
"type": "codeTransformNumberOfTransformedFilesAccepted",
3495+
"required": true
3496+
},
3497+
{
3498+
"type": "codeTransformNumberOfTransformedUnitsAccepted",
3499+
"required": false
3500+
},
3501+
{
3502+
"type": "codeTransformSessionId",
3503+
"required": true
3504+
}
3505+
]
3506+
},
34763507
{
34773508
"name": "codeTransform_dependenciesCopied",
34783509
"description": "Deprecated - use codeTransform_uploadProject (The repo copies over at least one dependency successfully)",
@@ -3550,7 +3581,7 @@
35503581
{
35513582
"name": "codeTransform_initiateTransform",
35523583
"description": "User initiates code transform from Q Chat Prompt.",
3553-
"metadata" : [
3584+
"metadata": [
35543585
{
35553586
"type": "codeTransformSessionId",
35563587
"required": true
@@ -3719,6 +3750,10 @@
37193750
"type": "codeTransformNumberOfProjects",
37203751
"required": false
37213752
},
3753+
{
3754+
"type": "codeTransformNumberOfTransformedFiles",
3755+
"required": false
3756+
},
37223757
{
37233758
"type": "codeTransformRunTimeLatency",
37243759
"required": false
@@ -3742,6 +3777,10 @@
37423777
{
37433778
"type": "result",
37443779
"required": false
3780+
},
3781+
{
3782+
"type": "source",
3783+
"required": false
37453784
}
37463785
]
37473786
},
@@ -3794,7 +3833,7 @@
37943833
{
37953834
"name": "codeTransform_localBuildProject",
37963835
"description": "Transform initiates local build.",
3797-
"metadata" : [
3836+
"metadata": [
37983837
{
37993838
"type": "codeTransformBuildCommand",
38003839
"required": true
@@ -3818,14 +3857,6 @@
38183857
"passive": true,
38193858
"description": "Deprecated - avoid logging every service call",
38203859
"metadata": [
3821-
{
3822-
"type": "codeTransformApiErrorMessage",
3823-
"required": true
3824-
},
3825-
{
3826-
"type": "codeTransformApiNames",
3827-
"required": true
3828-
},
38293860
{
38303861
"type": "codeTransformJobId",
38313862
"required": false
@@ -3841,6 +3872,10 @@
38413872
{
38423873
"type": "codeTransformTotalByteSize",
38433874
"required": false
3875+
},
3876+
{
3877+
"type": "reason",
3878+
"required": true
38443879
}
38453880
]
38463881
},
@@ -3882,19 +3917,19 @@
38823917
{
38833918
"name": "codeTransform_logGeneralError",
38843919
"passive": true,
3885-
"description": "Deprecated - avoid logging every service call",
3920+
"description": "A general error has occurred.",
38863921
"metadata": [
3887-
{
3888-
"type": "codeTransformApiErrorMessage",
3889-
"required": true
3890-
},
38913922
{
38923923
"type": "codeTransformJobId",
38933924
"required": false
38943925
},
38953926
{
38963927
"type": "codeTransformSessionId",
38973928
"required": true
3929+
},
3930+
{
3931+
"type": "reason",
3932+
"required": true
38983933
}
38993934
]
39003935
},
@@ -3946,7 +3981,7 @@
39463981
{
39473982
"name": "codeTransform_submitSelection",
39483983
"description": "User provides input to project module and language selection.",
3949-
"metadata" : [
3984+
"metadata": [
39503985
{
39513986
"type": "codeTransformJavaSourceVersionsAllowed",
39523987
"required": false
@@ -4016,11 +4051,10 @@
40164051
}
40174052
]
40184053
},
4019-
40204054
{
40214055
"name": "codeTransform_uploadProject",
40224056
"description": "Transform initiates project artifact upload.",
4023-
"metadata" : [
4057+
"metadata": [
40244058
{
40254059
"type": "codeTransformDependenciesCopied",
40264060
"required": true
@@ -4050,7 +4084,7 @@
40504084
{
40514085
"name": "codeTransform_validateProject",
40524086
"description": "Transform initiates project language, build tool, and build file validation.",
4053-
"metadata" : [
4087+
"metadata": [
40544088
{
40554089
"type": "buildSystemVersion",
40564090
"required": false
@@ -6770,4 +6804,4 @@
67706804
]
67716805
}
67726806
]
6773-
}
6807+
}

0 commit comments

Comments
 (0)