newrelic 9.7.4 → 9.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NEWS.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### v9.7.5 (2023-01-03)
2
+
3
+ * Added a check to the code level metrics utility to ensure filePath was set before adding the `code.*` attributes.
4
+
5
+ * Updated to latest version of `@newrelic/test-utilities`
6
+
7
+ * Fixed issue where listing of dependencies and packages from symlinked nested directories created an infinite loop which caused the agent to never connect.
8
+
1
9
  ### v9.7.4 (2022-12-15)
2
10
 
3
11
  * Fixed system info gathering to prevent unhandled promise rejection when an error occurs reading `/proc` information.
@@ -1771,7 +1771,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
1771
1771
 
1772
1772
  ### @newrelic/test-utilities
1773
1773
 
1774
- This product includes source derived from [@newrelic/test-utilities](https://github.com/newrelic/node-test-utilities) ([v7.1.1](https://github.com/newrelic/node-test-utilities/tree/v7.1.1)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-test-utilities/blob/v7.1.1/LICENSE):
1774
+ This product includes source derived from [@newrelic/test-utilities](https://github.com/newrelic/node-test-utilities) ([v7.2.0](https://github.com/newrelic/node-test-utilities/tree/v7.2.0)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-test-utilities/blob/v7.2.0/LICENSE):
1775
1775
 
1776
1776
  ```
1777
1777
  Apache License
@@ -139,7 +139,9 @@ async function listDependencies(root, children = [], visited = Object.create(nul
139
139
  // Make sure we haven't been to this directory before.
140
140
  if (visited[realCandidate]) {
141
141
  logger.trace('Not revisiting %s (from %s)', realCandidate, candidate)
142
+ return
142
143
  }
144
+
143
145
  visited[realCandidate] = true
144
146
 
145
147
  // Load the packages and dependencies for this directory.
@@ -56,7 +56,7 @@ clmUtils.addCLMAttributes = function addCLMAttributes(fn, segment) {
56
56
  const { lineNumber, method, file: filePath, column } = funcInfo(fn)
57
57
  const fnName = setFunctionName(method)
58
58
 
59
- if (isValidLength(fnName, 255) && isValidLength(filePath, 255)) {
59
+ if (isValidLength(fnName, 255) && filePath && isValidLength(filePath, 255)) {
60
60
  segment.addAttribute('code.filepath', filePath)
61
61
  segment.addAttribute('code.function', fnName)
62
62
  // both line numbers and columns start at 0 in v8, add 1 to reflect js code
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newrelic",
3
- "version": "9.7.4",
3
+ "version": "9.7.5",
4
4
  "author": "New Relic Node.js agent team <nodejs@newrelic.com>",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [
@@ -200,7 +200,7 @@
200
200
  "@newrelic/eslint-config": "^0.2.0",
201
201
  "@newrelic/newrelic-oss-cli": "^0.1.2",
202
202
  "@newrelic/proxy": "^2.0.0",
203
- "@newrelic/test-utilities": "^7.1.1",
203
+ "@newrelic/test-utilities": "^7.2.0",
204
204
  "@octokit/rest": "^18.0.15",
205
205
  "@slack/bolt": "^3.7.0",
206
206
  "ajv": "^6.12.6",