Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elastic-apm-node

Package Overview
Dependencies
Maintainers
2
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elastic-apm-node - npm Package Compare versions

Comparing version 2.11.1 to 2.11.2

4

CHANGELOG.md

@@ -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))

3

lib/instrumentation/express-utils.js

@@ -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
]
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc