api design – Request Forwarding Websockets with Nodejs

So the architecture I am currently working with, we have an api-gateway that gets all the requests and publishes them to our Eventsystem/ or directly to our essential services(auth, etc). Now we want to add a Socketbased Microservice that consumes some of our topics and processes them for client consumption.

But the question is, is there a proper way to forward the socket.io request through our gateway ?

The gateway is written in Node and the microservice probably will too.

The current approach is to just use a proxy:

const options = {
    target: '',
    changeOrigin: true,
    secure: false,
    ws: true

const socketProxy = proxy(options);
app.use('/reports', socketProxy );

But this way all our logging, healthchecks, req montiring would have to be implemented anew by the new service.

Is there a better way to approach this desgin ?