(blockView string, blockController string)
| 106 | } |
| 107 | |
| 108 | func recordBlockCreationTelemetry(blockView string, blockController string) { |
| 109 | defer func() { |
| 110 | panichandler.PanicHandler("CreateBlock:telemetry", recover()) |
| 111 | }() |
| 112 | if blockView == "" { |
| 113 | return |
| 114 | } |
| 115 | tctx, cancelFn := context.WithTimeout(context.Background(), 2*time.Second) |
| 116 | defer cancelFn() |
| 117 | telemetry.UpdateActivity(tctx, wshrpc.ActivityUpdate{ |
| 118 | Renderers: map[string]int{blockView: 1}, |
| 119 | }) |
| 120 | telemetry.RecordTEvent(tctx, &telemetrydata.TEvent{ |
| 121 | Event: "action:createblock", |
| 122 | Props: telemetrydata.TEventProps{ |
| 123 | BlockView: blockView, |
| 124 | BlockController: blockController, |
| 125 | }, |
| 126 | }) |
| 127 | } |
| 128 | |
| 129 | func createBlockObj(ctx context.Context, tabId string, blockDef *waveobj.BlockDef, rtOpts *waveobj.RuntimeOpts) (*waveobj.Block, error) { |
| 130 | return wstore.WithTxRtn(ctx, func(tx *wstore.TxWrap) (*waveobj.Block, error) { |
no test coverage detected