JavaScript SDK ⁠-⁠ trackWs method

If the default information tracked by our tracker when a JS error occurs is not enough, you can use this method. The handleError method manually reports caught exceptions, rejected promises or error events. See error reporting for more details.

trackWs: (channelName: string) => (msgType: string, data: string, dir: 'up' | 'down') => void
  • channelName: string: Name of the WS channel.

Returns a hook to apply to ws messages that takes msg type (or name), data and message direction (up/down === sent/received) as parameters.