File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import {
17
17
AppcomposerOpenWfs ,
18
18
AppcomposerPostProcess ,
19
19
AppcomposerRegenerateClicked ,
20
+ AppcomposerInitializeProject ,
20
21
telemetry ,
21
22
} from '../../shared/telemetry/telemetry'
22
23
import { getLogger } from '../../shared/logger'
@@ -61,6 +62,9 @@ export function emitTelemetryMessageHandler(message: EmitTelemetryMessage) {
61
62
case 'CLOSE_WFS' :
62
63
sendCloseWfs ( parsedData as AppcomposerCloseWfs )
63
64
return
65
+ case 'TEMPLATE_OPENED' :
66
+ sendInitializeProject ( parsedData as AppcomposerInitializeProject )
67
+ return
64
68
}
65
69
} catch ( e ) {
66
70
getLogger ( ) . error ( 'Could not log telemetry for App Composer' , e )
@@ -158,3 +162,10 @@ function sendCloseWfs(metadata: AppcomposerCloseWfs) {
158
162
didSave : metadata . didSave ,
159
163
} )
160
164
}
165
+
166
+ function sendInitializeProject ( metadata : AppcomposerInitializeProject ) {
167
+ telemetry . appcomposer_initializeProject . emit ( {
168
+ resourceCounts : metadata . resourceCounts ,
169
+ totalResourceCount : metadata . totalResourceCount ,
170
+ } )
171
+ }
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ enum TelemetryType {
55
55
ADD_CONNECTION = 'ADD_CONNECTION' ,
56
56
OPEN_WFS = 'OPEN_WFS' ,
57
57
CLOSE_WFS = 'CLOSE_WFS' ,
58
+ TEMPLATE_OPENED = 'TEMPLATE_OPENED' ,
58
59
}
59
60
60
61
export interface InitResponseMessage extends Message {
Original file line number Diff line number Diff line change 114
114
"type" : " boolean" ,
115
115
"description" : " Whether the user saved"
116
116
},
117
+ {
118
+ "name" : " resourceCounts" ,
119
+ "type" : " string" ,
120
+ "description" : " Per-resource count of each resource in an opened template"
121
+ },
122
+ {
123
+ "name" : " totalResourceCount" ,
124
+ "type" : " int" ,
125
+ "description" : " Total count of resources in an opened template"
126
+ },
117
127
{
118
128
"name" : " cwsprChatTriggerInteraction" ,
119
129
"type" : " string" ,
606
616
"description" : " Called when Step Functions Workflow Studio is closed" ,
607
617
"metadata" : [{ "type" : " didSave" }]
608
618
},
619
+ {
620
+ "name" : " appcomposer_initializeProject" ,
621
+ "description" : " Called when a project successfully loads" ,
622
+ "metadata" : [{ "type" : " resourceCounts" }, { "type" : " totalResourceCount" }]
623
+ },
609
624
{
610
625
"name" : " amazonq_openChat" ,
611
626
"description" : " When user opens CWSPR chat panel"
You can’t perform that action at this time.
0 commit comments