@@ -32,6 +32,9 @@ func CreateSubBlock(ctx context.Context, blockId string, blockDef *waveobj.Block
3232 if err != nil {
3333 return nil , fmt .Errorf ("error creating sub block: %w" , err )
3434 }
35+ blockView := blockDef .Meta .GetString (waveobj .MetaKey_View , "" )
36+ blockController := blockDef .Meta .GetString (waveobj .MetaKey_Controller , "" )
37+ go recordBlockCreationTelemetry (blockView , blockController , true )
3538 return blockData , nil
3639}
3740
@@ -100,12 +103,12 @@ func CreateBlockWithTelemetry(ctx context.Context, tabId string, blockDef *waveo
100103 if recordTelemetry {
101104 blockView := blockDef .Meta .GetString (waveobj .MetaKey_View , "" )
102105 blockController := blockDef .Meta .GetString (waveobj .MetaKey_Controller , "" )
103- go recordBlockCreationTelemetry (blockView , blockController )
106+ go recordBlockCreationTelemetry (blockView , blockController , false )
104107 }
105108 return blockData , nil
106109}
107110
108- func recordBlockCreationTelemetry (blockView string , blockController string ) {
111+ func recordBlockCreationTelemetry (blockView string , blockController string , subBlock bool ) {
109112 defer func () {
110113 panichandler .PanicHandler ("CreateBlock:telemetry" , recover ())
111114 }()
@@ -122,6 +125,7 @@ func recordBlockCreationTelemetry(blockView string, blockController string) {
122125 Props : telemetrydata.TEventProps {
123126 BlockView : blockView ,
124127 BlockController : blockController ,
128+ BlockSubBlock : subBlock ,
125129 },
126130 })
127131}
0 commit comments