@newrelic/aws-sdk
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -0,1 +1,7 @@ | ||
### 1.1.2 (2020-02-20): | ||
* Fixed issue where instrumentation would crash pulling `host` and `port` values when `AmazonDaxClient` was used as the service for `DocumentClient.` | ||
`AmazonDaxClient` requests will report 'unknown' for `host` and `port` attributes. Other oddities may still exist until DAX officially supported. | ||
### 1.1.1 (2020-01-27): | ||
@@ -2,0 +8,0 @@ |
@@ -38,4 +38,4 @@ 'use strict' | ||
parameters: { | ||
host: this.endpoint.host, | ||
port_path_or_id: this.endpoint.port, | ||
host: this.endpoint && this.endpoint.host, | ||
port_path_or_id: this.endpoint && this.endpoint.port, | ||
collection: params && params.TableName || 'Unknown' | ||
@@ -62,7 +62,12 @@ }, | ||
// DocumentClient can be defined with a different service such as AmazonDaxClient. | ||
// In these cases, an endpoint property may not exist. In the DAX case, | ||
// the eventual cached endpoint to be hit is not known at this point. | ||
const endpoint = this.service && this.service.endpoint | ||
return { | ||
name: dynamoOperation, | ||
parameters: { | ||
host: this.service.endpoint.host, | ||
port_path_or_id: this.service.endpoint.port, | ||
host: endpoint && endpoint.host, | ||
port_path_or_id: endpoint && endpoint.port, | ||
collection: params && params.TableName || 'Unknown' | ||
@@ -69,0 +74,0 @@ }, |
{ | ||
"name": "@newrelic/aws-sdk", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "New Relic instrumentation of the aws-sdk package.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -30,2 +30,14 @@ 'use strict' | ||
function getMatchingSegments(t, segment, pattern, markedSegments = []) { | ||
if (pattern.test(segment.name)) { | ||
markedSegments.push(segment) | ||
} | ||
segment.children.forEach((child) => { | ||
getMatchingSegments(t, child, pattern, markedSegments) | ||
}) | ||
return markedSegments | ||
} | ||
module.exports = { | ||
@@ -39,3 +51,4 @@ DATASTORE_PATTERN, | ||
checkAWSAttributes | ||
checkAWSAttributes, | ||
getMatchingSegments | ||
} |
@@ -36,2 +36,17 @@ { | ||
] | ||
}, | ||
{ | ||
"engines": { | ||
"node": ">=8.0" | ||
}, | ||
"dependencies": { | ||
"aws-sdk": { | ||
"versions": ">=2.380.0", | ||
"samples": 10 | ||
}, | ||
"amazon-dax-client": ">=1.0.2" | ||
}, | ||
"files": [ | ||
"amazon-dax-client.tap.js" | ||
] | ||
} | ||
@@ -38,0 +53,0 @@ ], |
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
59445
29
1480