Skip to content

Commit

Permalink
Add missing metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
j0sh committed Mar 10, 2025
1 parent a620120 commit 7236f83
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions server/ai_mediaserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ func (ls *LivepeerServer) CreateWhip(server *media.WHIPServer) http.Handler {
// Others: auth, selection, job setup
// Run them in parallel

streamRequestTime := time.Now().UnixMilli()
corsHeaders(w, r.Method)

ctx := r.Context()
Expand Down Expand Up @@ -797,6 +798,27 @@ func (ls *LivepeerServer) CreateWhip(server *media.WHIPServer) http.Handler {
whipConn.Close()
}

clog.Info(ctx, "Received live video AI request", "pipelineParams", pipelineParams)

// Clear any previous gateway status
GatewayStatus.Clear(streamID)

monitor.SendQueueEventAsync("stream_trace", map[string]interface{}{
"type": "gateway_receive_stream_request",
"timestamp": streamRequestTime,
"stream_id": streamID,
"pipeline_id": pipelineID,
"request_id": requestID,
"orchestrator_info": map[string]interface{}{
"address": "",
"url": "",
},
})

if monitor.Enabled {
monitor.AILiveVideoAttempt()
}

params := aiRequestParams{
node: ls.LivepeerNode,
os: drivers.NodeStorage.NewSession(requestID),
Expand Down

0 comments on commit 7236f83

Please sign in to comment.