How to use the elastic-apm-node.middleware 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 / server.js View on Github external
middlewares: {
      allowSystem,
      checkPermissions,
      restifyAuthorizationParser,
      ...middlewares.getAll() // shared between all plugins and core server
    },
    helpers: {
      wrapAction,
      populateRequesterParams,
      getRequestContext: getRouteRequestContext
    }
  })

  // must be the last middleware before error middleware
  if (isApmActive) {
    server.use(apm.middleware.connect())
  }

  return server
}