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.17.0 to 2.17.1

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 2.17.1 - 2019/9/26
* fix: support all falsy return values from error filters ([#1389](https://github.com/elastic/apm-agent-nodejs/pull/1389)) ([#1394](https://github.com/elastic/apm-agent-nodejs/pull/1394))
* fix: capture all non-string http bodies ([#1376](https://github.com/elastic/apm-agent-nodejs/pull/1376)) ([#1381](https://github.com/elastic/apm-agent-nodejs/pull/1381))
# 2.17.0 - 2019/9/19

@@ -2,0 +6,0 @@ * feat: add support for @koa/router ([#1346](https://github.com/elastic/apm-agent-nodejs/pull/1346))

12

lib/agent.js

@@ -388,7 +388,9 @@ 'use strict'

function send (error) {
const id = error.id
error = agent._errorFilters.process(error)
if (!error) {
agent.logger.debug('error ignored by filter %o', { id: error.id })
if (cb) cb(null, error.id)
agent.logger.debug('error ignored by filter %o', { id })
if (cb) cb(null, id)
return

@@ -398,6 +400,6 @@ }

if (agent._transport) {
agent.logger.info('Sending error to Elastic APM', { id: error.id })
agent.logger.info('Sending error to Elastic APM', { id })
agent._transport.sendError(error, function () {
agent.flush(function (err) {
if (cb) cb(err, error.id)
if (cb) cb(err, id)
})

@@ -407,3 +409,3 @@ })

// TODO: Swallow this error just as it's done in agent.flush()?
process.nextTick(cb.bind(null, new Error('cannot capture error before agent is started'), error.id))
process.nextTick(cb.bind(null, new Error('cannot capture error before agent is started'), id))
}

@@ -410,0 +412,0 @@ }

@@ -6,2 +6,6 @@ 'use strict'

// FOR INTERNAL TESTING PURPOSES ONLY!
const resettable = process.env._ELASTIC_APM_ASYNC_HOOKS_RESETTABLE === 'true'
let _asyncHook
module.exports = function (ins) {

@@ -11,2 +15,7 @@ const asyncHook = asyncHooks.createHook({ init, before, destroy })

if (resettable) {
if (_asyncHook) _asyncHook.disable()
_asyncHook = asyncHook
}
const activeTransactions = new Map()

@@ -13,0 +22,0 @@ Object.defineProperty(ins, 'currentTransaction', {

@@ -118,8 +118,8 @@ 'use strict'

if (captureBody) {
var bodyStr = typeof body === 'string'
? body
: (tryJsonStringify(body) || stringify(body))
if (bodyStr.length > exports._MAX_HTTP_BODY_CHARS) {
body = truncate(bodyStr, exports._MAX_HTTP_BODY_CHARS)
if (typeof body !== 'string') {
body = tryJsonStringify(body) || stringify(body)
}
if (body.length > exports._MAX_HTTP_BODY_CHARS) {
body = truncate(body, exports._MAX_HTTP_BODY_CHARS)
}
context.body = body

@@ -126,0 +126,0 @@ } else {

{
"name": "elastic-apm-node",
"version": "2.17.0",
"version": "2.17.1",
"description": "The official Elastic APM agent for Node.js",

@@ -23,3 +23,3 @@ "main": "index.js",

"test:babel": "babel test/babel/src.js --out-file test/babel/out.js && node test/babel/out.js",
"test:esm": "node --experimental-modules test/esm",
"test:esm": "node --experimental-modules test/esm/index.mjs",
"bench": "./test/benchmarks/scripts/run-benchmarks.sh",

@@ -197,5 +197,5 @@ "bench:ci": "./test/benchmarks/scripts/run-benchmarks-ci.sh",

"coordinates": [
55.778281,
12.593056
55.778258,
12.593172
]
}
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