Update api call info method (#3515)
* register RequestRouted handler for updating method Signed-off-by: shishir gowda <shishir@livekit.io> * pass room to telemetry in DeleteRoom api to extract roomID Signed-off-by: shishir gowda <shishir@livekit.io> --------- Signed-off-by: shishir gowda <shishir@livekit.io>
This commit is contained in:
@@ -133,7 +133,7 @@ func (s *RoomService) DeleteRoom(ctx context.Context, req *livekit.DeleteRoomReq
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ensure at least one node is available to handle the request
|
// ensure at least one node is available to handle the request
|
||||||
_, err = s.router.CreateRoom(ctx, &livekit.CreateRoomRequest{Name: req.Room})
|
room, err := s.router.CreateRoom(ctx, &livekit.CreateRoomRequest{Name: req.Room})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ func (s *RoomService) DeleteRoom(ctx context.Context, req *livekit.DeleteRoomReq
|
|||||||
|
|
||||||
err = s.roomStore.DeleteRoom(ctx, livekit.RoomName(req.Room))
|
err = s.roomStore.DeleteRoom(ctx, livekit.RoomName(req.Room))
|
||||||
res := &livekit.DeleteRoomResponse{}
|
res := &livekit.DeleteRoomResponse{}
|
||||||
RecordResponse(ctx, res)
|
RecordResponse(ctx, room)
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ func TwirpTelemetry(
|
|||||||
ResponseSent: func(ctx context.Context) {
|
ResponseSent: func(ctx context.Context) {
|
||||||
telemetryResponseSent(ctx, nodeID, getProjectID, telemetry)
|
telemetryResponseSent(ctx, nodeID, getProjectID, telemetry)
|
||||||
},
|
},
|
||||||
|
RequestRouted: telemetryRequestRouted,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user