Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ aiplans/
manifests/
.env
out
.kilocode/package-lock.json

# Yarn Modern
.pnp.*
Expand Down
1 change: 1 addition & 0 deletions pkg/telemetry/telemetrydata/telemetrydata.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ type TEventProps struct {

BlockView string `json:"block:view,omitempty"`
BlockController string `json:"block:controller,omitempty"`
BlockSubBlock bool `json:"block:subblock,omitempty"`

AiBackendType string `json:"ai:backendtype,omitempty"`
AiLocal bool `json:"ai:local,omitempty"`
Expand Down
8 changes: 6 additions & 2 deletions pkg/wcore/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func CreateSubBlock(ctx context.Context, blockId string, blockDef *waveobj.Block
if err != nil {
return nil, fmt.Errorf("error creating sub block: %w", err)
}
blockView := blockDef.Meta.GetString(waveobj.MetaKey_View, "")
blockController := blockDef.Meta.GetString(waveobj.MetaKey_Controller, "")
go recordBlockCreationTelemetry(blockView, blockController, true)
return blockData, nil
}

Expand Down Expand Up @@ -100,12 +103,12 @@ func CreateBlockWithTelemetry(ctx context.Context, tabId string, blockDef *waveo
if recordTelemetry {
blockView := blockDef.Meta.GetString(waveobj.MetaKey_View, "")
blockController := blockDef.Meta.GetString(waveobj.MetaKey_Controller, "")
go recordBlockCreationTelemetry(blockView, blockController)
go recordBlockCreationTelemetry(blockView, blockController, false)
}
return blockData, nil
}

func recordBlockCreationTelemetry(blockView string, blockController string) {
func recordBlockCreationTelemetry(blockView string, blockController string, subBlock bool) {
defer func() {
panichandler.PanicHandler("CreateBlock:telemetry", recover())
}()
Expand All @@ -122,6 +125,7 @@ func recordBlockCreationTelemetry(blockView string, blockController string) {
Props: telemetrydata.TEventProps{
BlockView: blockView,
BlockController: blockController,
BlockSubBlock: subBlock,
},
})
}
Expand Down
Loading