newrelic 7.3.0 → 7.3.1
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 +22 -14
- package/lib/instrumentation/core/async_hooks.js +6 -1
- package/package.json +2 -2
package/NEWS.md
CHANGED
|
@@ -1,31 +1,39 @@
|
|
|
1
|
+
### v7.3.1 (2021-04-14)
|
|
2
|
+
|
|
3
|
+
* Fixed issue with 'new_promise_tracking' feature flag functionality where segments for ended transactions would get propagated in certain cases by promises that had no continuations scheduled (via await or manually).
|
|
4
|
+
|
|
5
|
+
If you are experiencing high overhead levels with your promise usage and the agent attached, we recommend testing your application with 'new_promise_tracking' set to true to see if overhead is reduced. You'll also want to verify your data is still being captured correctly in case it falls into a known or unknown limitation of this approach. **NOTE: chaining of promise continuations onto an already resolved promise across an async hop (scheduled timer) will result in state-loss with this new functionality turned on. This is a less-common use-case but worth considering with your applications.**
|
|
6
|
+
|
|
7
|
+
**Deprecation Warning:** The certificate bundle automatically included by New Relic when using the 'certificates' configuration (commonly with proxies) will be disabled by default in the next major version. This is currently targeted for sometime in May. The bundle will be fully removed in later major versions. We recommend testing with the 'certificate_bundle' feature flag set to `false` to determine if you will need to modify your environment or setup your own appropriate bundle. Example configuration: `feature_flag: { certificate_bundle: false }`.
|
|
8
|
+
|
|
1
9
|
### v7.3.0 (2021-04-06)
|
|
2
10
|
|
|
3
|
-
* Added new feature-flag 'new_promise_tracking' which enables cleaning up of segment references on native promise resolve instead of destroy. Includes usage of async-await. This can be enabled via `feature_flag: { new_promise_tracking: true }` in the config file or `NEW_RELIC_FEATURE_FLAG_NEW_PROMISE_TRACKING=1` in your ENV vars.
|
|
4
|
-
|
|
5
|
-
Applications with heavy promise usage or high-throughput applications with some promise usage should see moderate to high reduction in memory usage and may see a slight reduction in CPU usage. A bump in throughput may also be noticed in some cases. Results will vary by application.
|
|
6
|
-
|
|
11
|
+
* Added new feature-flag 'new_promise_tracking' which enables cleaning up of segment references on native promise resolve instead of destroy. Includes usage of async-await. This can be enabled via `feature_flag: { new_promise_tracking: true }` in the config file or `NEW_RELIC_FEATURE_FLAG_NEW_PROMISE_TRACKING=1` in your ENV vars.
|
|
12
|
+
|
|
13
|
+
Applications with heavy promise usage or high-throughput applications with some promise usage should see moderate to high reduction in memory usage and may see a slight reduction in CPU usage. A bump in throughput may also be noticed in some cases. Results will vary by application.
|
|
14
|
+
|
|
7
15
|
If you are experiencing high overhead levels with your promise usage and the agent attached, we recommend testing your application with 'new_promise_tracking' set to true to see if overhead is reduced. You'll also want to verify your data is still being captured correctly in case it falls into a known or unknown limitation of this approach. **NOTE: chaining of promise continuations onto an already resolved promise across an async hop (scheduled timer) will result in state-loss with this new functionality turned on. This is a less-common use-case but worth considering with your applications.**
|
|
8
16
|
|
|
9
|
-
* Fixed memory leak introduced when Infinite Tracing is enabled.
|
|
10
|
-
|
|
17
|
+
* Fixed memory leak introduced when Infinite Tracing is enabled.
|
|
18
|
+
|
|
11
19
|
When Infinite Tracing endpoints reconnected they would instantiate a new gRPC client prior to calling `client.recordSpan()`. It appears several objects created by grpc-js (`ChannelImplementation` and child objects, promises, etc.) are held in memory indefinitely due to scheduled timers even when the client is no-longer referenced and the associated stream closed. We now avoid this situation by only creating the client once and then reusing it to establish new stream connections.
|
|
12
20
|
|
|
13
21
|
### v7.2.1 (2021-03-29)
|
|
14
22
|
|
|
15
23
|
* Dev-only sub-dependency bump of 'y18n' to clear npm audit warnings.
|
|
16
24
|
|
|
17
|
-
* Bumped @grpc/grpc-js to ^1.2.11.
|
|
18
|
-
|
|
25
|
+
* Bumped @grpc/grpc-js to ^1.2.11.
|
|
26
|
+
|
|
19
27
|
* Bumped @grpc/proto-loader to ^0.5.6.
|
|
20
28
|
|
|
21
|
-
* Agent no longer propagates segments for promises via async-hooks when the transaction associated with the parentSegment has ended.
|
|
22
|
-
|
|
29
|
+
* Agent no longer propagates segments for promises via async-hooks when the transaction associated with the parentSegment has ended.
|
|
30
|
+
|
|
23
31
|
This change reduces the amount of context tracking work needed for certain rare edge-case scenarios involving promises.
|
|
24
32
|
|
|
25
|
-
* Fixed issue where capturing axios request errors could result in a memory leak.
|
|
26
|
-
|
|
27
|
-
The agent now clears error references on transaction end, which are not used for later processing. Errors returned from 'axios' requests contain a reference to the request object which deeper down has a handle to a promise in `handleRequestError`. The TraceSegment associated with that promise has a handle to the transaction, which through the error capture ultimately kept the promise in memory and prevented it from being destroyed to free-up the TraceSegment from the segment map. This change also has the benefit of freeing up some memory early for transactions held onto for transaction traces.
|
|
28
|
-
|
|
33
|
+
* Fixed issue where capturing axios request errors could result in a memory leak.
|
|
34
|
+
|
|
35
|
+
The agent now clears error references on transaction end, which are not used for later processing. Errors returned from 'axios' requests contain a reference to the request object which deeper down has a handle to a promise in `handleRequestError`. The TraceSegment associated with that promise has a handle to the transaction, which through the error capture ultimately kept the promise in memory and prevented it from being destroyed to free-up the TraceSegment from the segment map. This change also has the benefit of freeing up some memory early for transactions held onto for transaction traces.
|
|
36
|
+
|
|
29
37
|
* Added active transaction check to `wrappedResEnd` to prevent unecessary work for ended transactions in the case of multiple `Response.prototype.end()` invocations.
|
|
30
38
|
|
|
31
39
|
### v7.2.0 (2021-03-23)
|
|
@@ -185,7 +185,12 @@ function getPromiseResolveStyleHooks(segmentMap, agent, shim) {
|
|
|
185
185
|
return
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
|
|
188
|
+
// Because the ID will no-longer be in memory until dispose to propagate the null
|
|
189
|
+
// we need to set it active here or else we may continue to propagate the wrong tree.
|
|
190
|
+
// May be some risk of setting this at the wrong time
|
|
191
|
+
if (hookSegment === null) {
|
|
192
|
+
shim.setActiveSegment(hookSegment)
|
|
193
|
+
}
|
|
189
194
|
}
|
|
190
195
|
}
|
|
191
196
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newrelic",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.1",
|
|
4
4
|
"author": "New Relic Node.js agent team <nodejs@newrelic.com>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"contributors": [
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"commander": "^7.0.0",
|
|
172
172
|
"eslint": "^6.8.0",
|
|
173
173
|
"express": "*",
|
|
174
|
-
"fastify": "^2.
|
|
174
|
+
"fastify": "^2.15.3",
|
|
175
175
|
"generic-pool": "^3.6.1",
|
|
176
176
|
"glob": "^7.1.2",
|
|
177
177
|
"got": "^8.0.1",
|