elastic-apm-node
Advanced tools
Comparing version 2.11.1 to 2.11.2
@@ -0,1 +1,5 @@ | ||
# 2.11.2 - 2019/5/21 | ||
* fix: url.parse expects req.url not req ([#1074](https://github.com/elastic/apm-agent-nodejs/pull/1074)) | ||
* fix(express-slash): expose express handle properties ([#1070](https://github.com/elastic/apm-agent-nodejs/pull/1070)) | ||
# 2.11.1 - 2019/5/10 | ||
@@ -2,0 +6,0 @@ * fix(instrumentation): explicitly use `require` ([#1059](https://github.com/elastic/apm-agent-nodejs/pull/1059)) |
@@ -7,3 +7,4 @@ 'use strict' | ||
} catch (e) { | ||
parseUrl = require('url').parse | ||
const url = require('url') | ||
parseUrl = req => url.parse(req.url) | ||
} | ||
@@ -10,0 +11,0 @@ var symbols = require('../symbols') |
@@ -45,4 +45,6 @@ 'use strict' | ||
shimmer.wrap(layer, 'handle', function (orig) { | ||
let handle | ||
if (!agent._conf.captureExceptions || orig.length !== 4) { | ||
return function (req, res, next) { | ||
handle = function (req, res, next) { | ||
if (!layer.route && layerPath && typeof next === 'function') { | ||
@@ -60,10 +62,18 @@ safePush(req, symbols.expressMountStack, layerPath) | ||
} | ||
} else { | ||
handle = function (err, req, res, next) { | ||
if (shouldReport(err)) { | ||
agent.captureError(err, { request: req }) | ||
} | ||
return orig.apply(this, arguments) | ||
} | ||
} | ||
return function (err, req, res, next) { | ||
if (shouldReport(err)) { | ||
agent.captureError(err, { request: req }) | ||
for (const prop in orig) { | ||
if (orig.hasOwnProperty(prop)) { | ||
handle[prop] = orig[prop] | ||
} | ||
return orig.apply(this, arguments) | ||
} | ||
return handle | ||
}) | ||
@@ -70,0 +80,0 @@ } |
{ | ||
"name": "elastic-apm-node", | ||
"version": "2.11.1", | ||
"version": "2.11.2", | ||
"description": "The official Elastic APM agent for Node.js", | ||
@@ -78,3 +78,3 @@ "main": "index.js", | ||
"console-log-level": "^1.4.0", | ||
"cookie": "^0.3.1", | ||
"cookie": "^0.4.0", | ||
"core-util-is": "^1.0.2", | ||
@@ -184,5 +184,5 @@ "elastic-apm-http-client": "^7.3.0", | ||
"coordinates": [ | ||
55.7734063, | ||
12.5062394 | ||
55.6809913, | ||
12.5644314 | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
230418
5371
+ Addedcookie@0.4.2(transitive)
- Removedcookie@0.3.1(transitive)
Updatedcookie@^0.4.0