elastic-apm-node
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -0,1 +1,5 @@ | ||
# 2.0.6 - 2018/12/18 | ||
* fix(graphql): don't throw on invalid query ([#747](https://github.com/elastic/apm-agent-nodejs/pull/747)) | ||
* fix(koa-router): support more complex routes ([#749](https://github.com/elastic/apm-agent-nodejs/pull/749)) | ||
# 2.0.5 - 2018/12/12 | ||
@@ -2,0 +6,0 @@ * fix: don't create spans for APM Server requests ([#735](https://github.com/elastic/apm-agent-nodejs/pull/735)) |
@@ -73,3 +73,10 @@ 'use strict' | ||
if (source) { | ||
var documentAST = graphql.parse(source) | ||
var documentAST | ||
try { | ||
documentAST = graphql.parse(source) | ||
} catch (syntaxError) { | ||
agent.logger.debug('graphql.parse(source) failed - skipping graphql query extraction') | ||
} | ||
if (documentAST) { | ||
@@ -81,4 +88,2 @@ var validationErrors = graphql.validate(schema, documentAST) | ||
} | ||
} else { | ||
agent.logger.debug('graphql.parse(source) failed - skipping graphql query extraction') | ||
} | ||
@@ -85,0 +90,0 @@ } else { |
@@ -24,5 +24,8 @@ 'use strict' | ||
if (matched && matched.pathAndMethod && matched.pathAndMethod.length) { | ||
var match = matched.pathAndMethod[matched.pathAndMethod.length - 1] | ||
var path = match && match.path | ||
if (Array.isArray(matched && matched.pathAndMethod)) { | ||
const layer = matched.pathAndMethod.find(function (layer) { | ||
return layer && layer.opts && layer.opts.end === true | ||
}) | ||
var path = layer && layer.path | ||
if (typeof path === 'string') { | ||
@@ -29,0 +32,0 @@ var name = method + ' ' + path |
{ | ||
"name": "elastic-apm-node", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "The official Elastic APM agent for Node.js", | ||
@@ -164,5 +164,5 @@ "main": "index.js", | ||
"coordinates": [ | ||
55.6773705, | ||
12.5614183 | ||
55.778266, | ||
12.592987 | ||
] | ||
} |
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
182754
4321