Skip to content

Commit 778c2e1

Browse files
BYOC: add orch swap reporting same as lv2v (#3865)
1 parent a38b81a commit 778c2e1

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

byoc/stream_gateway.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,21 @@ func (bsg *BYOCGatewayServer) runStream(gatewayJob *gatewayJob) {
262262
if err == nil {
263263
err = errors.New("unknown swap reason")
264264
}
265+
// report the swap
266+
monitor.SendQueueEventAsync("stream_trace", map[string]interface{}{
267+
"type": "orchestrator_swap",
268+
"stream_id": params.liveParams.streamID,
269+
"request_id": params.liveParams.requestID,
270+
"pipeline": params.liveParams.pipeline,
271+
"pipeline_id": params.liveParams.pipelineID,
272+
"message": err.Error(),
273+
"orchestrator_info": map[string]interface{}{
274+
"address": params.liveParams.orchToken.Address(),
275+
"url": params.liveParams.orchToken.URL(),
276+
},
277+
})
265278

266279
clog.Infof(ctx, "Retrying stream with a different orchestrator err=%v", err.Error())
267-
268-
params.liveParams.sendErrorEvent(err)
269280
}
270281

271282
//if there is ingress input then force off

0 commit comments

Comments
 (0)