How to use the elastic-apm-node.endTransaction function in elastic-apm-node

To help you get started, we’ve selected a few elastic-apm-node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stelace / stelace / src / services / signal.js View on Github external
maxNbClients: maxNbClientsPerPlatform
            }
          })

          return disconnect(reason)
        }

        otherChannels = channels.filter(c => ![...organizationIds, ...userIds].includes(c))
        if (otherChannels.length) {
          channelsToJoin.push(...otherChannels.map(c => prefixChannel(c, { platformId, env })))
        }

        debug(`WebSocket ${socket.client.id} subscribing to ${channelsToJoin.join(' ')}`)
        socket.join(channelsToJoin)

        apm.endTransaction()
      }