elastic-apm-node
Version:
The official Elastic APM agent for Node.js
17 lines (14 loc) • 444 B
JavaScript
/*
* Copyright Elasticsearch B.V. and other contributors where applicable.
* Licensed under the BSD 2-Clause License; you may not use this file except in
* compliance with the BSD 2-Clause License.
*/
;
module.exports = function connectMiddleware() {
var agent = this;
return function (err, req, res, next) {
agent.captureError(err, { request: req }, function elasticAPMMiddleware() {
next(err);
});
};
};