newrelic 11.23.2 → 12.0.0

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.
Files changed (38) hide show
  1. package/NEWS.md +39 -0
  2. package/README.md +31 -0
  3. package/THIRD_PARTY_NOTICES.md +262 -31
  4. package/index.js +1 -10
  5. package/lib/context-manager/create-context-manager.js +0 -11
  6. package/lib/feature_flags.js +1 -2
  7. package/lib/instrumentation/amqplib/amqplib.js +4 -243
  8. package/lib/instrumentation/amqplib/channel-model.js +129 -0
  9. package/lib/instrumentation/amqplib/channel.js +70 -0
  10. package/lib/instrumentation/amqplib/utils.js +141 -0
  11. package/lib/instrumentation/core/globals.js +0 -5
  12. package/lib/instrumentation/core/timers.js +1 -72
  13. package/lib/instrumentation/kafkajs/consumer.js +64 -48
  14. package/lib/instrumentation/kafkajs/index.js +13 -13
  15. package/lib/instrumentation/kafkajs/producer.js +68 -52
  16. package/lib/instrumentation/kafkajs/record-linking-metrics.js +17 -0
  17. package/lib/instrumentation/kafkajs/record-method-metric.js +21 -0
  18. package/lib/instrumentation/mongodb.js +9 -10
  19. package/lib/instrumentation/nextjs/next-server.js +178 -0
  20. package/lib/instrumentation/nextjs/nr-hooks.js +22 -0
  21. package/lib/instrumentation/nextjs/utils.js +71 -0
  22. package/lib/instrumentation/redis.js +13 -59
  23. package/lib/instrumentations.js +1 -1
  24. package/lib/metrics/names.js +1 -2
  25. package/lib/shim/message-shim/consume.js +9 -4
  26. package/lib/shim/message-shim/index.js +7 -14
  27. package/lib/shim/message-shim/subscribe-consume.js +25 -6
  28. package/lib/shim/specs/params/queue-message.js +2 -0
  29. package/lib/spans/span-event.js +17 -11
  30. package/lib/spans/streaming-span-event.js +15 -13
  31. package/lib/symbols.js +1 -0
  32. package/load-externals.js +15 -0
  33. package/package.json +10 -10
  34. package/lib/context-manager/legacy-context-manager.js +0 -66
  35. package/lib/instrumentation/core/async-hooks.js +0 -132
  36. package/lib/instrumentation/director.js +0 -64
  37. package/lib/instrumentation/mongodb/v2-mongo.js +0 -118
  38. package/lib/instrumentation/mongodb/v3-mongo.js +0 -85
package/NEWS.md CHANGED
@@ -1,3 +1,42 @@
1
+ ### v12.0.0 (2024-07-31)
2
+ #### ⚠ BREAKING CHANGES
3
+
4
+ * Dropped support for Node.js 16
5
+ * Removed legacy context manager
6
+ * Removed support for `redis` < 2.6.0
7
+ * Removed instrumentation for `director`
8
+ * Updated `mongodb` instrumentation to drop support for versions 2 and 3
9
+
10
+ #### Features
11
+
12
+ * Dropped support for Node.js 16 ([#2394](https://github.com/newrelic/node-newrelic/pull/2394)) ([1870010](https://github.com/newrelic/node-newrelic/commit/1870010a1d7dc417fc03ae526a9709e382b3fe1f))
13
+ * Removed legacy context manager ([#2404](https://github.com/newrelic/node-newrelic/pull/2404)) ([321244c](https://github.com/newrelic/node-newrelic/commit/321244c357bc5dd9b4aeefc308cda5e80b8012b0))
14
+ * Removed support for `redis` < 2.6.0 ([#2405](https://github.com/newrelic/node-newrelic/pull/2405)) ([e2c0a31](https://github.com/newrelic/node-newrelic/commit/e2c0a31b5230e0ffbdc3d4567619190570b7167c))
15
+ * Removed instrumentation for `director` ([#2402](https://github.com/newrelic/node-newrelic/pull/2402)) ([1b355e7](https://github.com/newrelic/node-newrelic/commit/1b355e733aef0e14c5f4cb2899642a3d5b6f18ce))
16
+ * Added `server.address` to amqplib spans ([#2406](https://github.com/newrelic/node-newrelic/pull/2406)) ([09636a4](https://github.com/newrelic/node-newrelic/commit/09636a4ce90969e7aea229ef008bd35f57e09217))
17
+ * Updated `mongodb` instrumentation to drop support for versions 2 and 3 ([#2398](https://github.com/newrelic/node-newrelic/pull/2398)) ([a0ae32a](https://github.com/newrelic/node-newrelic/commit/a0ae32a6a61112e0473d477075543485d02313cf))
18
+ * Migrated instrumentation for `next` into agent ([#2409](https://github.com/newrelic/node-newrelic/pull/2409)) ([b55d8e1](https://github.com/newr elic/node-newrelic/commit/b55d8e1ca09e6055ea09f4fcd773a05245e7203f))
19
+ * You no longer need to load Next.js instrumentation via `@newrelic/next`.
20
+ * Instead you must load the agent via `NODE_OPTIONS='-r newrelic' next start`
21
+
22
+ #### Documentation
23
+
24
+ * Updated compatibility report ([#2401](https://github.com/newrelic/node-newrelic/pull/2401)) ([a53085d](https://github.com/newrelic/node-newrelic/commit/a53085ddce2f2d7a4c9288fbf63fbf82436fb15f))
25
+
26
+ #### Miscellaneous chores
27
+
28
+ * Added test configs for defined targets in the aws test suite ([#2403](https://github.com/newrelic/node-newrelic/pull/2403)) ([cf514d9](https://github.com/newrelic/node-newrelic/commit/cf514d97b82889b14a342cbded630bae73992c35))
29
+ * Added producer and consumer metrics to kafkajs instrumentation ([#2407](https://github.com/newrelic/node-newrelic/pull/2407)) ([41c1cc6](https://github.com/newrelic/node-newrelic/commit/41c1cc6d9815a1b89a7ab043b5da5f032969a87e))
30
+ * Switched to using Node built-in test runner ([#2387](https://github.com/newrelic/node-newrelic/pull/2387)) ([b9f64b7](https://github.com/newrelic/node-newrelic/commit/b9f64b76b8777fc790a4694a95318f401a56abdd))
31
+ * Updated `@newrelic/native-metrics` to 11.0.0 ([#2412](https://github.com/newrelic/node-newrelic/pull/2412)) ([aef69e2](https://github.com/newrelic/node-newrelic/commit/aef69e28cc3ead2079cfc0bdf9bde74129a3711f))
32
+ * Updated dashboard links in developer-setup.md ([#2397](https://github.com/newrelic/node-newrelic/pull/2397)) ([16866da](https://github.com/newrelic/node-newrelic/commit/16866da381366ad848ea06be44fd838d57c9fb67))
33
+ * Verified MySQL host:port metric is recorded ([#2400](https://github.com/newrelic/node-newrelic/pull/2400)) ([74176f7](https://github.com/newrelic/node-newrelic/commit/74176f77f70247a3cf65b1b49c5414279b4eeca6))
34
+
35
+ #### Tests
36
+
37
+ * Removed mongodb-esm tests as they are not atomic and conflicting with mongodb tests in CI ([#2416](https://github.com/newrelic/node-newrelic/pull/2416)) ([e587b9d](https://github.com/newrelic/node-newrelic/commit/e587b9dcb795cca3c29c6e0da18770401c3085a0))
38
+ * Updated minimum version of lesser used versions of 3rd party libraries ([#2399](https://github.com/newrelic/node-newrelic/pull/2399)) ([ef8c006](https://github.com/newrelic/node-newrelic/commit/ef8c00674c22b4794c6cee823d46ad9db7d67fed))
39
+
1
40
  ### v11.23.2 (2024-07-22)
2
41
 
3
42
  #### Features
package/README.md CHANGED
@@ -61,6 +61,37 @@ If you cannot control how your program is run, you can load the `newrelic` modul
61
61
  /* ... the rest of your program ... */
62
62
  ```
63
63
 
64
+ ## Next.js instrumentation
65
+ **Note**: The minimum supported Next.js version is [12.0.9](https://github.com/vercel/next.js/releases/tag/v12.0.9). If you are using Next.js middleware the minimum supported version is [12.2.0](https://github.com/vercel/next.js/releases/tag/v12.2.0).
66
+
67
+ The New Relic Node.js agent provides instrumentation for Next.js The instrumentation provides telemetry for server-side rendering via [getServerSideProps](https://nextjs.org/docs/basic-features/data-fetching/get-server-side-props), [middleware](https://nextjs.org/docs/middleware), and New Relic transaction naming for both page and server requests. It does not provide any instrumentation for actions occurring during build or in client-side code. If you want telemetry data on actions occurring on the client (browser), you can [inject the browser agent](./documentation/nextjs/faqs/browser-agent.md).
68
+
69
+ Here are documents for more in-depth explanations about [transaction naming](./documentation/nextjs/transactions.md), and [segments/spans](./documentation/nextjs/segments-and-spans.md).
70
+
71
+
72
+ ### Setup
73
+ Typically you are running a Next.js app with the `next` cli and you must load the agent via `NODE_OPTIONS`:
74
+
75
+ ```sh
76
+ NODE_OPTIONS='-r newrelic' next start
77
+ ```
78
+
79
+ If you are having trouble getting the `newrelic` package to instrument Next.js, take a look at our [FAQs](./documentation/nextjs/faqs/README.md).
80
+
81
+ ### Next.js example projects
82
+ The following example applications show how to load the `newrelic` instrumentation, inject browser agent, and handle errors:
83
+
84
+ * [Pages Router example](https://github.com/newrelic/newrelic-node-examples/tree/58f760e828c45d90391bda3f66764d4420ba4990/nextjs-legacy)
85
+ * [App Router example](https://github.com/newrelic/newrelic-node-examples/tree/58f760e828c45d90391bda3f66764d4420ba4990/nextjs-app-router)
86
+
87
+ ### Custom Next.js servers
88
+
89
+ If you are using next as a [custom server](https://nextjs.org/docs/advanced-features/custom-server), you're probably not running your application with the `next` CLI. In that scenario we recommend running the Next.js instrumentation as follows.
90
+
91
+ ```sh
92
+ node -r newrelic your-program.js
93
+ ```
94
+
64
95
  ## ECMAScript Modules
65
96
 
66
97
  If your application is written with `import` and `export` statements in javascript, you are using [ES Modules](https://nodejs.org/api/esm.html#modules-ecmascript-modules) and must bootstrap the agent in a different way.
@@ -44,6 +44,7 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
44
44
  * [ajv](#ajv)
45
45
  * [async](#async)
46
46
  * [aws-sdk](#aws-sdk)
47
+ * [borp](#borp)
47
48
  * [c8](#c8)
48
49
  * [clean-jsdoc-theme](#clean-jsdoc-theme)
49
50
  * [commander](#commander)
@@ -91,7 +92,7 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
91
92
 
92
93
  ### @grpc/grpc-js
93
94
 
94
- This product includes source derived from [@grpc/grpc-js](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) ([v1.10.8](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/tree/v1.10.8)), distributed under the [Apache-2.0 License](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/blob/v1.10.8/LICENSE):
95
+ This product includes source derived from [@grpc/grpc-js](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) ([v1.11.1](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/tree/v1.11.1)), distributed under the [Apache-2.0 License](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/blob/v1.11.1/LICENSE):
95
96
 
96
97
  ```
97
98
  Apache License
@@ -539,7 +540,7 @@ SOFTWARE.
539
540
 
540
541
  ### @newrelic/security-agent
541
542
 
542
- This product includes source derived from [@newrelic/security-agent](https://github.com/newrelic/csec-node-agent) ([v1.3.0](https://github.com/newrelic/csec-node-agent/tree/v1.3.0)), distributed under the [UNKNOWN License](https://github.com/newrelic/csec-node-agent/blob/v1.3.0/LICENSE):
543
+ This product includes source derived from [@newrelic/security-agent](https://github.com/newrelic/csec-node-agent) ([v1.4.0](https://github.com/newrelic/csec-node-agent/tree/v1.4.0)), distributed under the [UNKNOWN License](https://github.com/newrelic/csec-node-agent/blob/v1.4.0/LICENSE):
543
544
 
544
545
  ```
545
546
  ## New Relic Software License v1.0
@@ -645,7 +646,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
645
646
 
646
647
  ### https-proxy-agent
647
648
 
648
- This product includes source derived from [https-proxy-agent](https://github.com/TooTallNate/proxy-agents) ([v7.0.4](https://github.com/TooTallNate/proxy-agents/tree/v7.0.4)), distributed under the [MIT License](https://github.com/TooTallNate/proxy-agents/blob/v7.0.4/LICENSE):
649
+ This product includes source derived from [https-proxy-agent](https://github.com/TooTallNate/proxy-agents) ([v7.0.5](https://github.com/TooTallNate/proxy-agents/tree/v7.0.5)), distributed under the [MIT License](https://github.com/TooTallNate/proxy-agents/blob/v7.0.5/LICENSE):
649
650
 
650
651
  ```
651
652
  (The MIT License)
@@ -674,22 +675,210 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
674
675
 
675
676
  ### import-in-the-middle
676
677
 
677
- This product includes source derived from [import-in-the-middle](https://github.com/DataDog/import-in-the-middle) ([v1.8.0](https://github.com/DataDog/import-in-the-middle/tree/v1.8.0)), distributed under the [Apache-2.0 License](https://github.com/DataDog/import-in-the-middle/blob/v1.8.0/LICENSE):
678
+ This product includes source derived from [import-in-the-middle](https://github.com/nodejs/import-in-the-middle) ([v1.9.1](https://github.com/nodejs/import-in-the-middle/tree/v1.9.1)), distributed under the [Apache-2.0 License](https://github.com/nodejs/import-in-the-middle/blob/v1.9.1/LICENSE):
678
679
 
679
680
  ```
680
- Copyright 2021 Datadog, Inc.
681
+ Apache License
682
+ Version 2.0, January 2004
683
+ http://www.apache.org/licenses/
681
684
 
682
- Licensed under the Apache License, Version 2.0 (the "License");
683
- you may not use this file except in compliance with the License.
684
- You may obtain a copy of the License at
685
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
686
+
687
+ 1. Definitions.
685
688
 
686
- http://www.apache.org/licenses/LICENSE-2.0
689
+ "License" shall mean the terms and conditions for use, reproduction,
690
+ and distribution as defined by Sections 1 through 9 of this document.
687
691
 
688
- Unless required by applicable law or agreed to in writing, software
689
- distributed under the License is distributed on an "AS IS" BASIS,
690
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
691
- See the License for the specific language governing permissions and
692
- limitations under the License.
692
+ "Licensor" shall mean the copyright owner or entity authorized by
693
+ the copyright owner that is granting the License.
694
+
695
+ "Legal Entity" shall mean the union of the acting entity and all
696
+ other entities that control, are controlled by, or are under common
697
+ control with that entity. For the purposes of this definition,
698
+ "control" means (i) the power, direct or indirect, to cause the
699
+ direction or management of such entity, whether by contract or
700
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
701
+ outstanding shares, or (iii) beneficial ownership of such entity.
702
+
703
+ "You" (or "Your") shall mean an individual or Legal Entity
704
+ exercising permissions granted by this License.
705
+
706
+ "Source" form shall mean the preferred form for making modifications,
707
+ including but not limited to software source code, documentation
708
+ source, and configuration files.
709
+
710
+ "Object" form shall mean any form resulting from mechanical
711
+ transformation or translation of a Source form, including but
712
+ not limited to compiled object code, generated documentation,
713
+ and conversions to other media types.
714
+
715
+ "Work" shall mean the work of authorship, whether in Source or
716
+ Object form, made available under the License, as indicated by a
717
+ copyright notice that is included in or attached to the work
718
+ (an example is provided in the Appendix below).
719
+
720
+ "Derivative Works" shall mean any work, whether in Source or Object
721
+ form, that is based on (or derived from) the Work and for which the
722
+ editorial revisions, annotations, elaborations, or other modifications
723
+ represent, as a whole, an original work of authorship. For the purposes
724
+ of this License, Derivative Works shall not include works that remain
725
+ separable from, or merely link (or bind by name) to the interfaces of,
726
+ the Work and Derivative Works thereof.
727
+
728
+ "Contribution" shall mean any work of authorship, including
729
+ the original version of the Work and any modifications or additions
730
+ to that Work or Derivative Works thereof, that is intentionally
731
+ submitted to Licensor for inclusion in the Work by the copyright owner
732
+ or by an individual or Legal Entity authorized to submit on behalf of
733
+ the copyright owner. For the purposes of this definition, "submitted"
734
+ means any form of electronic, verbal, or written communication sent
735
+ to the Licensor or its representatives, including but not limited to
736
+ communication on electronic mailing lists, source code control systems,
737
+ and issue tracking systems that are managed by, or on behalf of, the
738
+ Licensor for the purpose of discussing and improving the Work, but
739
+ excluding communication that is conspicuously marked or otherwise
740
+ designated in writing by the copyright owner as "Not a Contribution."
741
+
742
+ "Contributor" shall mean Licensor and any individual or Legal Entity
743
+ on behalf of whom a Contribution has been received by Licensor and
744
+ subsequently incorporated within the Work.
745
+
746
+ 2. Grant of Copyright License. Subject to the terms and conditions of
747
+ this License, each Contributor hereby grants to You a perpetual,
748
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
749
+ copyright license to reproduce, prepare Derivative Works of,
750
+ publicly display, publicly perform, sublicense, and distribute the
751
+ Work and such Derivative Works in Source or Object form.
752
+
753
+ 3. Grant of Patent License. Subject to the terms and conditions of
754
+ this License, each Contributor hereby grants to You a perpetual,
755
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
756
+ (except as stated in this section) patent license to make, have made,
757
+ use, offer to sell, sell, import, and otherwise transfer the Work,
758
+ where such license applies only to those patent claims licensable
759
+ by such Contributor that are necessarily infringed by their
760
+ Contribution(s) alone or by combination of their Contribution(s)
761
+ with the Work to which such Contribution(s) was submitted. If You
762
+ institute patent litigation against any entity (including a
763
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
764
+ or a Contribution incorporated within the Work constitutes direct
765
+ or contributory patent infringement, then any patent licenses
766
+ granted to You under this License for that Work shall terminate
767
+ as of the date such litigation is filed.
768
+
769
+ 4. Redistribution. You may reproduce and distribute copies of the
770
+ Work or Derivative Works thereof in any medium, with or without
771
+ modifications, and in Source or Object form, provided that You
772
+ meet the following conditions:
773
+
774
+ (a) You must give any other recipients of the Work or
775
+ Derivative Works a copy of this License; and
776
+
777
+ (b) You must cause any modified files to carry prominent notices
778
+ stating that You changed the files; and
779
+
780
+ (c) You must retain, in the Source form of any Derivative Works
781
+ that You distribute, all copyright, patent, trademark, and
782
+ attribution notices from the Source form of the Work,
783
+ excluding those notices that do not pertain to any part of
784
+ the Derivative Works; and
785
+
786
+ (d) If the Work includes a "NOTICE" text file as part of its
787
+ distribution, then any Derivative Works that You distribute must
788
+ include a readable copy of the attribution notices contained
789
+ within such NOTICE file, excluding those notices that do not
790
+ pertain to any part of the Derivative Works, in at least one
791
+ of the following places: within a NOTICE text file distributed
792
+ as part of the Derivative Works; within the Source form or
793
+ documentation, if provided along with the Derivative Works; or,
794
+ within a display generated by the Derivative Works, if and
795
+ wherever such third-party notices normally appear. The contents
796
+ of the NOTICE file are for informational purposes only and
797
+ do not modify the License. You may add Your own attribution
798
+ notices within Derivative Works that You distribute, alongside
799
+ or as an addendum to the NOTICE text from the Work, provided
800
+ that such additional attribution notices cannot be construed
801
+ as modifying the License.
802
+
803
+ You may add Your own copyright statement to Your modifications and
804
+ may provide additional or different license terms and conditions
805
+ for use, reproduction, or distribution of Your modifications, or
806
+ for any such Derivative Works as a whole, provided Your use,
807
+ reproduction, and distribution of the Work otherwise complies with
808
+ the conditions stated in this License.
809
+
810
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
811
+ any Contribution intentionally submitted for inclusion in the Work
812
+ by You to the Licensor shall be under the terms and conditions of
813
+ this License, without any additional terms or conditions.
814
+ Notwithstanding the above, nothing herein shall supersede or modify
815
+ the terms of any separate license agreement you may have executed
816
+ with Licensor regarding such Contributions.
817
+
818
+ 6. Trademarks. This License does not grant permission to use the trade
819
+ names, trademarks, service marks, or product names of the Licensor,
820
+ except as required for reasonable and customary use in describing the
821
+ origin of the Work and reproducing the content of the NOTICE file.
822
+
823
+ 7. Disclaimer of Warranty. Unless required by applicable law or
824
+ agreed to in writing, Licensor provides the Work (and each
825
+ Contributor provides its Contributions) on an "AS IS" BASIS,
826
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
827
+ implied, including, without limitation, any warranties or conditions
828
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
829
+ PARTICULAR PURPOSE. You are solely responsible for determining the
830
+ appropriateness of using or redistributing the Work and assume any
831
+ risks associated with Your exercise of permissions under this License.
832
+
833
+ 8. Limitation of Liability. In no event and under no legal theory,
834
+ whether in tort (including negligence), contract, or otherwise,
835
+ unless required by applicable law (such as deliberate and grossly
836
+ negligent acts) or agreed to in writing, shall any Contributor be
837
+ liable to You for damages, including any direct, indirect, special,
838
+ incidental, or consequential damages of any character arising as a
839
+ result of this License or out of the use or inability to use the
840
+ Work (including but not limited to damages for loss of goodwill,
841
+ work stoppage, computer failure or malfunction, or any and all
842
+ other commercial damages or losses), even if such Contributor
843
+ has been advised of the possibility of such damages.
844
+
845
+ 9. Accepting Warranty or Additional Liability. While redistributing
846
+ the Work or Derivative Works thereof, You may choose to offer,
847
+ and charge a fee for, acceptance of support, warranty, indemnity,
848
+ or other liability obligations and/or rights consistent with this
849
+ License. However, in accepting such obligations, You may act only
850
+ on Your own behalf and on Your sole responsibility, not on behalf
851
+ of any other Contributor, and only if You agree to indemnify,
852
+ defend, and hold each Contributor harmless for any liability
853
+ incurred by, or claims asserted against, such Contributor by reason
854
+ of your accepting any such warranty or additional liability.
855
+
856
+ END OF TERMS AND CONDITIONS
857
+
858
+ APPENDIX: How to apply the Apache License to your work.
859
+
860
+ To apply the Apache License to your work, attach the following
861
+ boilerplate notice, with the fields enclosed by brackets "[]"
862
+ replaced with your own identifying information. (Don't include
863
+ the brackets!) The text should be enclosed in the appropriate
864
+ comment syntax for the file format. We also recommend that a
865
+ file or class name and description of purpose be included on the
866
+ same "printed page" as the copyright notice for easier
867
+ identification within third-party archives.
868
+
869
+ Copyright [yyyy] [name of copyright owner]
870
+
871
+ Licensed under the Apache License, Version 2.0 (the "License");
872
+ you may not use this file except in compliance with the License.
873
+ You may obtain a copy of the License at
874
+
875
+ http://www.apache.org/licenses/LICENSE-2.0
876
+
877
+ Unless required by applicable law or agreed to in writing, software
878
+ distributed under the License is distributed on an "AS IS" BASIS,
879
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
880
+ See the License for the specific language governing permissions and
881
+ limitations under the License.
693
882
 
694
883
  ```
695
884
 
@@ -830,7 +1019,7 @@ IN THE SOFTWARE.
830
1019
 
831
1020
  ### semver
832
1021
 
833
- This product includes source derived from [semver](https://github.com/npm/node-semver) ([v7.6.2](https://github.com/npm/node-semver/tree/v7.6.2)), distributed under the [ISC License](https://github.com/npm/node-semver/blob/v7.6.2/LICENSE):
1022
+ This product includes source derived from [semver](https://github.com/npm/node-semver) ([v7.6.3](https://github.com/npm/node-semver/tree/v7.6.3)), distributed under the [ISC License](https://github.com/npm/node-semver/blob/v7.6.3/LICENSE):
834
1023
 
835
1024
  ```
836
1025
  The ISC License
@@ -853,7 +1042,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
853
1042
 
854
1043
  ### winston-transport
855
1044
 
856
- This product includes source derived from [winston-transport](https://github.com/winstonjs/winston-transport) ([v4.7.0](https://github.com/winstonjs/winston-transport/tree/v4.7.0)), distributed under the [MIT License](https://github.com/winstonjs/winston-transport/blob/v4.7.0/LICENSE):
1045
+ This product includes source derived from [winston-transport](https://github.com/winstonjs/winston-transport) ([v4.7.1](https://github.com/winstonjs/winston-transport/tree/v4.7.1)), distributed under the [MIT License](https://github.com/winstonjs/winston-transport/blob/v4.7.1/LICENSE):
857
1046
 
858
1047
  ```
859
1048
  The MIT License (MIT)
@@ -886,7 +1075,7 @@ SOFTWARE.
886
1075
 
887
1076
  ### @aws-sdk/client-s3
888
1077
 
889
- This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.592.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.592.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.592.0/LICENSE):
1078
+ This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.616.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.616.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.616.0/LICENSE):
890
1079
 
891
1080
  ```
892
1081
  Apache License
@@ -1095,7 +1284,7 @@ This product includes source derived from [@aws-sdk/client-s3](https://github.co
1095
1284
 
1096
1285
  ### @aws-sdk/s3-request-presigner
1097
1286
 
1098
- This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.592.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.592.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.592.0/LICENSE):
1287
+ This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.616.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.616.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.616.0/LICENSE):
1099
1288
 
1100
1289
  ```
1101
1290
  Apache License
@@ -1750,7 +1939,7 @@ This product includes source derived from [@newrelic/newrelic-oss-cli](https://g
1750
1939
 
1751
1940
  ### @newrelic/test-utilities
1752
1941
 
1753
- This product includes source derived from [@newrelic/test-utilities](https://github.com/newrelic/node-test-utilities) ([v8.6.0](https://github.com/newrelic/node-test-utilities/tree/v8.6.0)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-test-utilities/blob/v8.6.0/LICENSE):
1942
+ This product includes source derived from [@newrelic/test-utilities](https://github.com/newrelic/node-test-utilities) ([v8.7.0](https://github.com/newrelic/node-test-utilities/tree/v8.7.0)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-test-utilities/blob/v8.7.0/LICENSE):
1754
1943
 
1755
1944
  ```
1756
1945
  Apache License
@@ -1989,7 +2178,7 @@ THE SOFTWARE.
1989
2178
 
1990
2179
  ### @slack/bolt
1991
2180
 
1992
- This product includes source derived from [@slack/bolt](https://github.com/slackapi/bolt) ([v3.18.0](https://github.com/slackapi/bolt/tree/v3.18.0)), distributed under the [MIT License](https://github.com/slackapi/bolt/blob/v3.18.0/LICENSE):
2181
+ This product includes source derived from [@slack/bolt](https://github.com/slackapi/bolt) ([v3.19.0](https://github.com/slackapi/bolt/tree/v3.19.0)), distributed under the [MIT License](https://github.com/slackapi/bolt/blob/v3.19.0/LICENSE):
1993
2182
 
1994
2183
  ```
1995
2184
  The MIT License (MIT)
@@ -2493,7 +2682,7 @@ THE SOFTWARE.
2493
2682
 
2494
2683
  ### aws-sdk
2495
2684
 
2496
- This product includes source derived from [aws-sdk](https://github.com/aws/aws-sdk-js) ([v2.1636.0](https://github.com/aws/aws-sdk-js/tree/v2.1636.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js/blob/v2.1636.0/LICENSE.txt):
2685
+ This product includes source derived from [aws-sdk](https://github.com/aws/aws-sdk-js) ([v2.1659.0](https://github.com/aws/aws-sdk-js/tree/v2.1659.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js/blob/v2.1659.0/LICENSE.txt):
2497
2686
 
2498
2687
  ```
2499
2688
 
@@ -2701,6 +2890,35 @@ This product includes source derived from [aws-sdk](https://github.com/aws/aws-s
2701
2890
 
2702
2891
  ```
2703
2892
 
2893
+ ### borp
2894
+
2895
+ This product includes source derived from [borp](https://github.com/mcollina/borp) ([v0.17.0](https://github.com/mcollina/borp/tree/v0.17.0)), distributed under the [MIT License](https://github.com/mcollina/borp/blob/v0.17.0/LICENSE):
2896
+
2897
+ ```
2898
+ MIT License
2899
+
2900
+ Copyright (c) 2023 Matteo Collina
2901
+
2902
+ Permission is hereby granted, free of charge, to any person obtaining a copy
2903
+ of this software and associated documentation files (the "Software"), to deal
2904
+ in the Software without restriction, including without limitation the rights
2905
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2906
+ copies of the Software, and to permit persons to whom the Software is
2907
+ furnished to do so, subject to the following conditions:
2908
+
2909
+ The above copyright notice and this permission notice shall be included in all
2910
+ copies or substantial portions of the Software.
2911
+
2912
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2913
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2914
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2915
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2916
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2917
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2918
+ SOFTWARE.
2919
+
2920
+ ```
2921
+
2704
2922
  ### c8
2705
2923
 
2706
2924
  This product includes source derived from [c8](https://github.com/bcoe/c8) ([v8.0.1](https://github.com/bcoe/c8/tree/v8.0.1)), distributed under the [ISC License](https://github.com/bcoe/c8/blob/v8.0.1/LICENSE.txt):
@@ -2892,7 +3110,7 @@ THE SOFTWARE.
2892
3110
 
2893
3111
  ### eslint-plugin-jsdoc
2894
3112
 
2895
- This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v48.2.8](https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.2.8)), distributed under the [BSD-3-Clause License](https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.2.8/LICENSE):
3113
+ This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v48.8.0](https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.8.0)), distributed under the [BSD-3-Clause License](https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.8.0/LICENSE):
2896
3114
 
2897
3115
  ```
2898
3116
  Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/)
@@ -3474,7 +3692,7 @@ SOFTWARE.
3474
3692
 
3475
3693
  ### lockfile-lint
3476
3694
 
3477
- This product includes source derived from [lockfile-lint](https://github.com/lirantal/lockfile-lint) ([v4.13.2](https://github.com/lirantal/lockfile-lint/tree/v4.13.2)), distributed under the [Apache-2.0 License](https://github.com/lirantal/lockfile-lint/blob/v4.13.2/LICENSE):
3695
+ This product includes source derived from [lockfile-lint](https://github.com/lirantal/lockfile-lint) ([v4.14.0](https://github.com/lirantal/lockfile-lint/tree/v4.14.0)), distributed under the [Apache-2.0 License](https://github.com/lirantal/lockfile-lint/blob/v4.14.0/LICENSE):
3478
3696
 
3479
3697
  ```
3480
3698
 
@@ -3701,18 +3919,31 @@ SOFTWARE.
3701
3919
 
3702
3920
  ### proxy
3703
3921
 
3704
- This product includes source derived from [proxy](https://github.com/TooTallNate/proxy-agents) ([v2.1.1](https://github.com/TooTallNate/proxy-agents/tree/v2.1.1)), distributed under the [MIT License](https://github.com/TooTallNate/proxy-agents/blob/v2.1.1/README.md):
3922
+ This product includes source derived from [proxy](https://github.com/TooTallNate/proxy-agents) ([v2.2.0](https://github.com/TooTallNate/proxy-agents/tree/v2.2.0)), distributed under the [MIT License](https://github.com/TooTallNate/proxy-agents/blob/v2.2.0/LICENSE):
3705
3923
 
3706
3924
  ```
3707
- MIT License
3925
+ (The MIT License)
3708
3926
 
3709
- Copyright (c) <year> <copyright holders>
3927
+ Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
3710
3928
 
3711
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3929
+ Permission is hereby granted, free of charge, to any person obtaining
3930
+ a copy of this software and associated documentation files (the
3931
+ 'Software'), to deal in the Software without restriction, including
3932
+ without limitation the rights to use, copy, modify, merge, publish,
3933
+ distribute, sublicense, and/or sell copies of the Software, and to
3934
+ permit persons to whom the Software is furnished to do so, subject to
3935
+ the following conditions:
3712
3936
 
3713
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
3937
+ The above copyright notice and this permission notice shall be
3938
+ included in all copies or substantial portions of the Software.
3714
3939
 
3715
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3940
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
3941
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3942
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
3943
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
3944
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
3945
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
3946
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3716
3947
  ```
3717
3948
 
3718
3949
  ### proxyquire
@@ -3748,7 +3979,7 @@ OTHER DEALINGS IN THE SOFTWARE.
3748
3979
 
3749
3980
  ### rfdc
3750
3981
 
3751
- This product includes source derived from [rfdc](https://github.com/davidmarkclements/rfdc) ([v1.3.1](https://github.com/davidmarkclements/rfdc/tree/v1.3.1)), distributed under the [MIT License](https://github.com/davidmarkclements/rfdc/blob/v1.3.1/LICENSE):
3982
+ This product includes source derived from [rfdc](https://github.com/davidmarkclements/rfdc) ([v1.4.1](https://github.com/davidmarkclements/rfdc/tree/v1.4.1)), distributed under the [MIT License](https://github.com/davidmarkclements/rfdc/blob/v1.4.1/LICENSE):
3752
3983
 
3753
3984
  ```
3754
3985
  Copyright 2019 "David Mark Clements <david.mark.clements@gmail.com>"
@@ -3967,7 +4198,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3967
4198
 
3968
4199
  ### @newrelic/native-metrics
3969
4200
 
3970
- This product includes source derived from [@newrelic/native-metrics](https://github.com/newrelic/node-native-metrics) ([v10.1.1](https://github.com/newrelic/node-native-metrics/tree/v10.1.1)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-native-metrics/blob/v10.1.1/LICENSE):
4201
+ This product includes source derived from [@newrelic/native-metrics](https://github.com/newrelic/node-native-metrics) ([v10.2.0](https://github.com/newrelic/node-native-metrics/tree/v10.2.0)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-native-metrics/blob/v10.2.0/LICENSE):
3971
4202
 
3972
4203
  ```
3973
4204
  Apache License
package/index.js CHANGED
@@ -17,7 +17,6 @@ const featureFlags = require('./lib/feature_flags').prerelease
17
17
  const psemver = require('./lib/util/process-version')
18
18
  let logger = require('./lib/logger') // Gets re-loaded after initialization.
19
19
  const NAMES = require('./lib/metrics/names')
20
- const isESMSupported = psemver.satisfies('>=16.2.0')
21
20
 
22
21
  const pkgJSON = require('./package.json')
23
22
  logger.info(
@@ -246,15 +245,7 @@ function recordLoaderMetric(agent) {
246
245
  (arg === '--loader' || arg === '--experimental-loader') &&
247
246
  process.execArgv[index + 1] === 'newrelic/esm-loader.mjs'
248
247
  ) {
249
- if (isESMSupported) {
250
- agent.metrics.getOrCreateMetric(NAMES.FEATURES.ESM.LOADER).incrementCallCount()
251
- } else {
252
- agent.metrics.getOrCreateMetric(NAMES.FEATURES.ESM.UNSUPPORTED_LOADER)
253
- logger.warn(
254
- 'New Relic for Node.js ESM loader requires a version of Node >= v16.12.0; your version is %s. Instrumentation will not be registered.',
255
- process.version
256
- )
257
- }
248
+ agent.metrics.getOrCreateMetric(NAMES.FEATURES.ESM.LOADER).incrementCallCount()
258
249
  }
259
250
  })
260
251
 
@@ -16,10 +16,6 @@ const logger = require('../logger')
16
16
  * the current configuration.
17
17
  */
18
18
  function createContextManager(config) {
19
- if (config.feature_flag.legacy_context_manager) {
20
- return createLegacyContextManager(config)
21
- }
22
-
23
19
  return createAsyncLocalContextManager(config)
24
20
  }
25
21
 
@@ -30,11 +26,4 @@ function createAsyncLocalContextManager(config) {
30
26
  return new AsyncLocalContextManager(config)
31
27
  }
32
28
 
33
- function createLegacyContextManager(config) {
34
- logger.info('Using LegacyContextManager')
35
-
36
- const LegacyContextManager = require('./legacy-context-manager')
37
- return new LegacyContextManager(config)
38
- }
39
-
40
29
  module.exports = createContextManager
@@ -15,7 +15,6 @@ exports.prerelease = {
15
15
  reverse_naming_rules: false,
16
16
  undici_async_tracking: true,
17
17
  unresolved_promise_cleanup: true,
18
- legacy_context_manager: false,
19
18
  kafkajs_instrumentation: false
20
19
  }
21
20
 
@@ -43,4 +42,4 @@ exports.released = [
43
42
  ]
44
43
 
45
44
  // flags that are no longer used for unreleased features
46
- exports.unreleased = ['unreleased']
45
+ exports.unreleased = ['unreleased', 'legacy_context_manager']