metrics() {
    const connectionsByProtocol = {};

    for (const connection of this.connections.values()) {
      const protocol = connection.connection.protocol.toLowerCase();
      if (protocol === "internal") {
        continue;
      }

      if (connectionsByProtocol[protocol] === undefined) {
        connectionsByProtocol[protocol] = 0;
      }

      connectionsByProtocol[protocol]++;
    }

    return {
      connections: connectionsByProtocol,
    };
  }
Returns the metrics of the router
@returns {Object}