diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 85d4ed221a..00031c48dd 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -31,6 +31,8 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic **[devDependencies](#devDependencies)** +* [@aws-sdk/client-s3](#aws-sdkclient-s3) +* [@aws-sdk/s3-request-presigner](#aws-sdks3-request-presigner) * [@koa/router](#koarouter) * [@newrelic/eslint-config](#newreliceslint-config) * [@newrelic/newrelic-oss-cli](#newrelicnewrelic-oss-cli) @@ -41,6 +43,7 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic * [@smithy/util-utf8](#smithyutil-utf8) * [ajv](#ajv) * [async](#async) +* [aws-sdk](#aws-sdk) * [c8](#c8) * [clean-jsdoc-theme](#clean-jsdoc-theme) * [commander](#commander) @@ -67,6 +70,7 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic * [proxy](#proxy) * [proxyquire](#proxyquire) * [q](#q) +* [rfdc](#rfdc) * [rimraf](#rimraf) * [should](#should) * [sinon](#sinon) @@ -90,7 +94,7 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic ### @grpc/grpc-js -This product includes source derived from [@grpc/grpc-js](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) ([v1.10.6](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/tree/v1.10.6)), distributed under the [Apache-2.0 License](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/blob/v1.10.6/LICENSE): +This product includes source derived from [@grpc/grpc-js](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) ([v1.10.7](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/tree/v1.10.7)), distributed under the [Apache-2.0 License](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/blob/v1.10.7/LICENSE): ``` Apache License @@ -299,7 +303,7 @@ This product includes source derived from [@grpc/grpc-js](https://github.com/grp ### @grpc/proto-loader -This product includes source derived from [@grpc/proto-loader](https://github.com/grpc/grpc-node) ([v0.7.12](https://github.com/grpc/grpc-node/tree/v0.7.12)), distributed under the [Apache-2.0 License](https://github.com/grpc/grpc-node/blob/v0.7.12/LICENSE): +This product includes source derived from [@grpc/proto-loader](https://github.com/grpc/grpc-node) ([v0.7.13](https://github.com/grpc/grpc-node/tree/v0.7.13)), distributed under the [Apache-2.0 License](https://github.com/grpc/grpc-node/blob/v0.7.13/LICENSE): ``` Apache License @@ -673,7 +677,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ### import-in-the-middle -This product includes source derived from [import-in-the-middle](https://github.com/DataDog/import-in-the-middle) ([v1.7.3](https://github.com/DataDog/import-in-the-middle/tree/v1.7.3)), distributed under the [Apache-2.0 License](https://github.com/DataDog/import-in-the-middle/blob/v1.7.3/LICENSE): +This product includes source derived from [import-in-the-middle](https://github.com/DataDog/import-in-the-middle) ([v1.7.4](https://github.com/DataDog/import-in-the-middle/tree/v1.7.4)), distributed under the [Apache-2.0 License](https://github.com/DataDog/import-in-the-middle/blob/v1.7.4/LICENSE): ``` Copyright 2021 Datadog, Inc. @@ -829,7 +833,7 @@ IN THE SOFTWARE. ### semver -This product includes source derived from [semver](https://github.com/npm/node-semver) ([v7.6.0](https://github.com/npm/node-semver/tree/v7.6.0)), distributed under the [ISC License](https://github.com/npm/node-semver/blob/v7.6.0/LICENSE): +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): ``` The ISC License @@ -883,6 +887,424 @@ SOFTWARE. ## devDependencies +### @aws-sdk/client-s3 + +This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.572.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.572.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.572.0/LICENSE): + +``` + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +``` + +### @aws-sdk/s3-request-presigner + +This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.572.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.572.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.572.0/LICENSE): + +``` + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +``` + ### @koa/router This product includes source derived from [@koa/router](https://github.com/koajs/router) ([v12.0.1](https://github.com/koajs/router/tree/v12.0.1)), distributed under the [MIT License](https://github.com/koajs/router/blob/v12.0.1/LICENSE): @@ -1570,7 +1992,7 @@ THE SOFTWARE. ### @slack/bolt -This product includes source derived from [@slack/bolt](https://github.com/slackapi/bolt) ([v3.17.1](https://github.com/slackapi/bolt/tree/v3.17.1)), distributed under the [MIT License](https://github.com/slackapi/bolt/blob/v3.17.1/LICENSE): +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): ``` The MIT License (MIT) @@ -2072,6 +2494,216 @@ THE SOFTWARE. ``` +### aws-sdk + +This product includes source derived from [aws-sdk](https://github.com/aws/aws-sdk-js) ([v2.1618.0](https://github.com/aws/aws-sdk-js/tree/v2.1618.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js/blob/v2.1618.0/LICENSE.txt): + +``` + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +``` + ### c8 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): @@ -2096,7 +2728,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ### clean-jsdoc-theme -This product includes source derived from [clean-jsdoc-theme](https://github.com/ankitskvmdam/clean-jsdoc-theme) ([v4.2.18](https://github.com/ankitskvmdam/clean-jsdoc-theme/tree/v4.2.18)), distributed under the [MIT License](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/v4.2.18/LICENSE): +This product includes source derived from [clean-jsdoc-theme](https://github.com/ankitskvmdam/clean-jsdoc-theme) ([v4.3.0](https://github.com/ankitskvmdam/clean-jsdoc-theme/tree/v4.3.0)), distributed under the [MIT License](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/v4.3.0/LICENSE): ``` MIT License @@ -2263,7 +2895,7 @@ THE SOFTWARE. ### eslint-plugin-jsdoc -This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v48.2.3](https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.2.3)), distributed under the [BSD-3-Clause License](https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.2.3/LICENSE): +This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v48.2.4](https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.2.4)), distributed under the [BSD-3-Clause License](https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.2.4/LICENSE): ``` Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/) @@ -2631,7 +3263,7 @@ SOFTWARE. ### jsdoc -This product includes source derived from [jsdoc](https://github.com/jsdoc/jsdoc) ([v4.0.2](https://github.com/jsdoc/jsdoc/tree/v4.0.2)), distributed under the [Apache-2.0 License](https://github.com/jsdoc/jsdoc/blob/v4.0.2/LICENSE.md): +This product includes source derived from [jsdoc](https://github.com/jsdoc/jsdoc) ([v4.0.3](https://github.com/jsdoc/jsdoc/tree/v4.0.3)), distributed under the [Apache-2.0 License](https://github.com/jsdoc/jsdoc/blob/v4.0.3/LICENSE.md): ``` # License @@ -3169,6 +3801,29 @@ IN THE SOFTWARE. ``` +### rfdc + +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): + +``` +Copyright 2019 "David Mark Clements " + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions +of the Software. + +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. + +``` + ### rimraf This product includes source derived from [rimraf](https://github.com/isaacs/rimraf) ([v2.7.1](https://github.com/isaacs/rimraf/tree/v2.7.1)), distributed under the [ISC License](https://github.com/isaacs/rimraf/blob/v2.7.1/LICENSE): @@ -3257,7 +3912,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### superagent -This product includes source derived from [superagent](https://github.com/ladjs/superagent) ([v8.1.2](https://github.com/ladjs/superagent/tree/v8.1.2)), distributed under the [MIT License](https://github.com/ladjs/superagent/blob/v8.1.2/LICENSE): +This product includes source derived from [superagent](https://github.com/ladjs/superagent) ([v9.0.2](https://github.com/ladjs/superagent/tree/v9.0.2)), distributed under the [MIT License](https://github.com/ladjs/superagent/blob/v9.0.2/LICENSE): ``` (The MIT License) diff --git a/lib/serverless/api-gateway.js b/lib/serverless/api-gateway.js index 2913a8013e..48d9c35a35 100644 --- a/lib/serverless/api-gateway.js +++ b/lib/serverless/api-gateway.js @@ -16,11 +16,20 @@ class LambdaProxyWebRequest { this.headers = normalizeHeaders(event) this.url = { - path: event.path, + path: '', port: lowerCaseHeaders['x-forwarded-port'], requestParameters: normalizeQueryStringParameters(event) } - this.method = event.httpMethod + this.method = '' + + if (isGatewayV1Event(event) === true) { + this.url.path = event.path + this.method = event.httpMethod + } else if (isGatewayV2Event(event) === true) { + this.url.path = event.requestContext.http.path + this.method = event.requestContext.http.method + } + this.transportType = lowerCaseHeaders['x-forwarded-proto'] } } @@ -94,7 +103,41 @@ function normalizeHeaders(event, lowerCaseKey = false) { * to create a web transaction. */ function isLambdaProxyEvent(event) { - return !!(event.path && (event.headers ?? event.multiValueHeaders) && event.httpMethod) + return isGatewayV1Event(event) || isGatewayV2Event(event) +} + +function isGatewayV1Event(event) { + let result = false + + if (event?.version === '1.0') { + result = true + } else if ( + typeof event?.path === 'string' && + (event.headers ?? event.multiValueHeaders) && + typeof event?.httpMethod === 'string' + // eslint-disable-next-line sonarjs/no-duplicated-branches + ) { + result = true + } + + return result +} + +function isGatewayV2Event(event) { + let result = false + + if (event?.version === '2.0') { + result = true + } else if ( + typeof event?.requestContext?.http?.path === 'string' && + Object.prototype.toString.call(event.headers) === '[object Object]' && + typeof event?.requestContext?.http?.method === 'string' + // eslint-disable-next-line sonarjs/no-duplicated-branches + ) { + result = true + } + + return result } /** diff --git a/lib/serverless/event-sources.json b/lib/serverless/event-sources.json index d2f48e12de..f0c9a4d054 100644 --- a/lib/serverless/event-sources.json +++ b/lib/serverless/event-sources.json @@ -7,6 +7,7 @@ "requestContext.elb" ] }, + "apiGateway": { "attributes": { "aws.lambda.eventSource.accountId": "requestContext.accountId", @@ -24,6 +25,24 @@ "requestContext.stage" ] }, + + "apiGatewayV2": { + "attributes": { + "aws.lambda.eventSource.accountId": "requestContext.accountId", + "aws.lambda.eventSource.apiId": "requestContext.apiId", + "aws.lambda.eventSource.stage": "requestContext.stage" + }, + "name": "apiGatewayV2", + "required_keys": [ + "version", + "headers", + "requestContext.http", + "requestContext.http.path", + "requestContext.http.method", + "requestContext.stage" + ] + }, + "cloudFront": { "attributes": {}, "name": "cloudFront", @@ -31,6 +50,7 @@ "Records[0].cf" ] }, + "cloudWatchScheduled": { "attributes": { "aws.lambda.eventSource.account": "account", @@ -45,6 +65,7 @@ "source" ] }, + "dynamoStreams": { "attributes": { "aws.lambda.eventSource.length": "Records.length" @@ -54,6 +75,7 @@ "Records[0].dynamodb" ] }, + "firehose": { "attributes": { "aws.lambda.eventSource.length": "records.length", @@ -65,6 +87,7 @@ "records[0].kinesisRecordMetadata" ] }, + "kinesis": { "attributes": { "aws.lambda.eventSource.length": "Records.length", @@ -75,6 +98,7 @@ "Records[0].kinesis" ] }, + "s3": { "attributes": { "aws.lambda.eventSource.bucketName": "Records[0].s3.bucket.name", @@ -91,6 +115,7 @@ "Records[0].s3" ] }, + "ses": { "attributes": { "aws.lambda.eventSource.date": "Records[0].ses.mail.commonHeaders.date", @@ -103,6 +128,7 @@ "Records[0].ses" ] }, + "sns": { "attributes": { "aws.lambda.eventSource.length": "Records.length", @@ -116,6 +142,7 @@ "Records[0].Sns" ] }, + "sqs": { "attributes": { "aws.lambda.eventSource.length": "Records.length" @@ -125,4 +152,4 @@ "Records[0].receiptHandle" ] } -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 54ecaa9ff3..0e19fa4f95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -67,6 +67,7 @@ "proxy": "^2.1.1", "proxyquire": "^1.8.0", "q": "*", + "rfdc": "^1.3.1", "rimraf": "^2.6.3", "should": "*", "sinon": "^4.5.0", diff --git a/package.json b/package.json index bfaf3a0af3..fbfd1724e3 100644 --- a/package.json +++ b/package.json @@ -252,6 +252,7 @@ "proxy": "^2.1.1", "proxyquire": "^1.8.0", "q": "*", + "rfdc": "^1.3.1", "rimraf": "^2.6.3", "should": "*", "sinon": "^4.5.0", diff --git a/test/unit/serverless/api-gateway-v2.test.js b/test/unit/serverless/api-gateway-v2.test.js new file mode 100644 index 0000000000..ee34d17e64 --- /dev/null +++ b/test/unit/serverless/api-gateway-v2.test.js @@ -0,0 +1,274 @@ +/* + * Copyright 2024 New Relic Corporation. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +'use strict' + +const tap = require('tap') +const os = require('os') +const rfdc = require('rfdc')() +const helper = require('../../lib/agent_helper') +const AwsLambda = require('../../../lib/serverless/aws-lambda') + +const ATTR_DEST = require('../../../lib/config/attribute-filter').DESTINATIONS + +// https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html +const v2Event = { + version: '2.0', + routeKey: '$default', + rawPath: '/my/path', + rawQueryString: 'parameter1=value1¶meter1=value2¶meter2=value', + cookies: ['cookie1', 'cookie2'], + headers: { + header1: 'value1', + header2: 'value1,value2', + accept: 'application/json' + }, + queryStringParameters: { + parameter1: 'value1,value2', + parameter2: 'value', + name: 'me', + team: 'node agent' + }, + requestContext: { + accountId: '123456789012', + apiId: 'api-id', + authentication: { + clientCert: { + clientCertPem: 'CERT_CONTENT', + subjectDN: 'www.example.com', + issuerDN: 'Example issuer', + serialNumber: 'a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1', + validity: { + notBefore: 'May 28 12:30:02 2019 GMT', + notAfter: 'Aug 5 09:36:04 2021 GMT' + } + } + }, + authorizer: { + jwt: { + claims: { + claim1: 'value1', + claim2: 'value2' + }, + scopes: ['scope1', 'scope2'] + } + }, + domainName: 'id.execute-api.us-east-1.amazonaws.com', + domainPrefix: 'id', + http: { + method: 'POST', + path: '/my/path', + protocol: 'HTTP/1.1', + sourceIp: '192.0.2.1', + userAgent: 'agent' + }, + requestId: 'id', + routeKey: '$default', + stage: '$default', + time: '12/Mar/2020:19:03:58 +0000', + timeEpoch: 1583348638390 + }, + body: 'Hello from Lambda', + pathParameters: { + parameter1: 'value1' + }, + isBase64Encoded: false, + stageVariables: { + stageVariable1: 'value1', + stageVariable2: 'value2' + } +} + +tap.beforeEach((t) => { + // This env var suppresses console output we don't need to inspect. + process.env.NEWRELIC_PIPE_PATH = os.devNull + + t.context.agent = helper.loadMockedAgent({ + allow_all_headers: true, + serverless_mode: { + enabled: true + } + }) + + t.context.lambda = new AwsLambda(t.context.agent) + t.context.lambda._resetModuleState() + + // structuredClone is not available in Node 16 ☹️ + t.context.event = rfdc(v2Event) + t.context.functionContext = { + done() {}, + succeed() {}, + fail() {}, + functionName: 'testFunction', + functionVersion: 'testVersion', + invokedFunctionArn: 'arn:test:function', + memoryLimitInMB: '128', + awsRequestId: 'testId' + } + t.context.responseBody = { + isBase64Encoded: false, + statusCode: 200, + headers: { responseHeader: 'headerValue' }, + body: 'worked' + } + + t.context.agent.setState('started') +}) + +tap.afterEach((t) => { + helper.unloadAgent(t.context.agent) +}) + +tap.test('should pick up the arn', async (t) => { + const { agent, lambda, event, functionContext } = t.context + t.equal(agent.collector.metadata.arn, null) + lambda.patchLambdaHandler(() => {})(event, functionContext, () => {}) + t.equal(agent.collector.metadata.arn, functionContext.invokedFunctionArn) +}) + +tap.test('should create a web transaction', (t) => { + t.plan(8) + + const { agent, lambda, event, functionContext, responseBody } = t.context + agent.on('transactionFinished', verifyAttributes) + + const wrappedHandler = lambda.patchLambdaHandler((event, context, callback) => { + const tx = agent.tracer.getTransaction() + t.ok(tx) + t.equal(tx.type, 'web') + t.equal(tx.getFullName(), 'WebTransaction/Function/testFunction') + t.equal(tx.isActive(), true) + + callback(null, responseBody) + }) + + wrappedHandler(event, functionContext, () => {}) + + function verifyAttributes(tx) { + const agentAttributes = tx.trace.attributes.get(ATTR_DEST.TRANS_EVENT) + const segment = tx.baseSegment + const spanAttributes = segment.attributes.get(ATTR_DEST.SPAN_EVENT) + + t.equal(agentAttributes['request.method'], 'POST') + t.equal(agentAttributes['request.uri'], '/my/path') + t.equal(spanAttributes['request.method'], 'POST') + t.equal(spanAttributes['request.uri'], '/my/path') + + t.end() + } +}) + +tap.test('should set w3c tracecontext on transaction if present on request header', (t) => { + t.plan(2) + + const expectedTraceId = '4bf92f3577b34da6a3ce929d0e0e4736' + const traceparent = `00-${expectedTraceId}-00f067aa0ba902b7-00` + const { agent, lambda, event, functionContext, responseBody } = t.context + agent.on('transactionFinished', () => { + t.end() + }) + + agent.config.distributed_tracing.enabled = true + event.headers.traceparent = traceparent + + const wrappedHandler = lambda.patchLambdaHandler((event, context, callback) => { + const tx = agent.tracer.getTransaction() + + const headers = {} + tx.insertDistributedTraceHeaders(headers) + + const traceParentFields = headers.traceparent.split('-') + const [version, traceId] = traceParentFields + + t.equal(version, '00') + t.equal(traceId, expectedTraceId) + + callback(null, responseBody) + }) + + wrappedHandler(event, functionContext, () => {}) +}) + +tap.test('should add w3c tracecontext to transaction if not present on request header', (t) => { + t.plan(2) + + const { agent, lambda, event, functionContext, responseBody } = t.context + agent.on('transactionFinished', () => { + t.end() + }) + + agent.config.account_id = 'AccountId1' + agent.config.primary_application_id = 'AppId1' + agent.config.trusted_account_key = 33 + agent.config.distributed_tracing.enabled = true + + const wrappedHandler = lambda.patchLambdaHandler((event, context, callback) => { + const tx = agent.tracer.getTransaction() + + const headers = {} + tx.insertDistributedTraceHeaders(headers) + + t.match(headers.traceparent, /00-[a-f0-9]{32}-[a-f0-9]{16}-\d{2}/) + t.match(headers.tracestate, /33@nr=.+AccountId1-AppId1.+/) + + callback(null, responseBody) + }) + + wrappedHandler(event, functionContext, () => {}) +}) + +tap.test('should capture request parameters', (t) => { + t.plan(5) + + const { agent, lambda, event, functionContext, responseBody } = t.context + agent.on('transactionFinished', verifyAttributes) + + agent.config.attributes.enabled = true + agent.config.attributes.include = ['request.parameters.*'] + agent.config.span_events.attributes.include = ['request.parameters.*'] + agent.config.emit('attributes.include') + agent.config.emit('span_events.attributes.include') + + const wrappedHandler = lambda.patchLambdaHandler((event, context, callback) => { + callback(null, responseBody) + }) + + wrappedHandler(event, functionContext, () => {}) + + function verifyAttributes(tx) { + const agentAttributes = tx.trace.attributes.get(ATTR_DEST.TRANS_EVENT) + t.equal(agentAttributes['request.parameters.name'], 'me') + t.equal(agentAttributes['request.parameters.team'], 'node agent') + + const spanAttributes = tx.baseSegment.attributes.get(ATTR_DEST.SPAN_EVENT) + t.equal(spanAttributes['request.parameters.name'], 'me') + t.equal(spanAttributes['request.parameters.team'], 'node agent') + + t.equal(agentAttributes['request.parameters.parameter1'], 'value1,value2') + + t.end() + } +}) + +tap.test('should capture request headers', (t) => { + t.plan(2) + + const { agent, lambda, event, functionContext, responseBody } = t.context + agent.on('transactionFinished', verifyAttributes) + + const wrappedHandler = lambda.patchLambdaHandler((event, context, callback) => { + callback(null, responseBody) + }) + wrappedHandler(event, functionContext, () => {}) + + function verifyAttributes(tx) { + const attrs = tx.trace.attributes.get(ATTR_DEST.TRANS_EVENT) + + t.equal(attrs['request.headers.accept'], 'application/json') + t.equal(attrs['request.headers.header2'], 'value1,value2') + + t.end() + } +}) diff --git a/third_party_manifest.json b/third_party_manifest.json index 4fbd219c7f..84ca2a2ad6 100644 --- a/third_party_manifest.json +++ b/third_party_manifest.json @@ -1,5 +1,5 @@ { - "lastUpdated": "Fri Apr 26 2024 14:57:01 GMT-0400 (Eastern Daylight Time)", + "lastUpdated": "Mon May 13 2024 08:00:44 GMT-0400 (Eastern Daylight Time)", "projectName": "New Relic Node Agent", "projectUrl": "https://github.com/newrelic/node-newrelic", "includeOptDeps": true, @@ -44,27 +44,27 @@ }, "includeDev": true, "dependencies": { - "@grpc/grpc-js@1.10.6": { + "@grpc/grpc-js@1.10.7": { "name": "@grpc/grpc-js", - "version": "1.10.6", + "version": "1.10.7", "range": "^1.9.4", "licenses": "Apache-2.0", "repoUrl": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js", - "versionedRepoUrl": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/tree/v1.10.6", + "versionedRepoUrl": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/tree/v1.10.7", "licenseFile": "node_modules/@grpc/grpc-js/LICENSE", - "licenseUrl": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/blob/v1.10.6/LICENSE", + "licenseUrl": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/blob/v1.10.7/LICENSE", "licenseTextSource": "file", "publisher": "Google Inc." }, - "@grpc/proto-loader@0.7.12": { + "@grpc/proto-loader@0.7.13": { "name": "@grpc/proto-loader", - "version": "0.7.12", + "version": "0.7.13", "range": "^0.7.5", "licenses": "Apache-2.0", "repoUrl": "https://github.com/grpc/grpc-node", - "versionedRepoUrl": "https://github.com/grpc/grpc-node/tree/v0.7.12", + "versionedRepoUrl": "https://github.com/grpc/grpc-node/tree/v0.7.13", "licenseFile": "node_modules/@grpc/proto-loader/LICENSE", - "licenseUrl": "https://github.com/grpc/grpc-node/blob/v0.7.12/LICENSE", + "licenseUrl": "https://github.com/grpc/grpc-node/blob/v0.7.13/LICENSE", "licenseTextSource": "file", "publisher": "Google Inc." }, @@ -134,15 +134,15 @@ "email": "nathan@tootallnate.net", "url": "http://n8.io/" }, - "import-in-the-middle@1.7.3": { + "import-in-the-middle@1.7.4": { "name": "import-in-the-middle", - "version": "1.7.3", + "version": "1.7.4", "range": "^1.6.0", "licenses": "Apache-2.0", "repoUrl": "https://github.com/DataDog/import-in-the-middle", - "versionedRepoUrl": "https://github.com/DataDog/import-in-the-middle/tree/v1.7.3", + "versionedRepoUrl": "https://github.com/DataDog/import-in-the-middle/tree/v1.7.4", "licenseFile": "node_modules/import-in-the-middle/LICENSE", - "licenseUrl": "https://github.com/DataDog/import-in-the-middle/blob/v1.7.3/LICENSE", + "licenseUrl": "https://github.com/DataDog/import-in-the-middle/blob/v1.7.4/LICENSE", "licenseTextSource": "file", "publisher": "Bryan English", "email": "bryan.english@datadoghq.com" @@ -199,15 +199,15 @@ "licenseUrl": "https://github.com/nodejs/readable-stream/blob/v3.6.2/LICENSE", "licenseTextSource": "file" }, - "semver@7.6.0": { + "semver@7.6.2": { "name": "semver", - "version": "7.6.0", + "version": "7.6.2", "range": "^7.5.2", "licenses": "ISC", "repoUrl": "https://github.com/npm/node-semver", - "versionedRepoUrl": "https://github.com/npm/node-semver/tree/v7.6.0", + "versionedRepoUrl": "https://github.com/npm/node-semver/tree/v7.6.2", "licenseFile": "node_modules/semver/LICENSE", - "licenseUrl": "https://github.com/npm/node-semver/blob/v7.6.0/LICENSE", + "licenseUrl": "https://github.com/npm/node-semver/blob/v7.6.2/LICENSE", "licenseTextSource": "file", "publisher": "GitHub Inc." }, @@ -226,6 +226,32 @@ } }, "devDependencies": { + "@aws-sdk/client-s3@3.572.0": { + "name": "@aws-sdk/client-s3", + "version": "3.572.0", + "range": "^3.556.0", + "licenses": "Apache-2.0", + "repoUrl": "https://github.com/aws/aws-sdk-js-v3", + "versionedRepoUrl": "https://github.com/aws/aws-sdk-js-v3/tree/v3.572.0", + "licenseFile": "node_modules/@aws-sdk/client-s3/LICENSE", + "licenseUrl": "https://github.com/aws/aws-sdk-js-v3/blob/v3.572.0/LICENSE", + "licenseTextSource": "file", + "publisher": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "@aws-sdk/s3-request-presigner@3.572.0": { + "name": "@aws-sdk/s3-request-presigner", + "version": "3.572.0", + "range": "^3.556.0", + "licenses": "Apache-2.0", + "repoUrl": "https://github.com/aws/aws-sdk-js-v3", + "versionedRepoUrl": "https://github.com/aws/aws-sdk-js-v3/tree/v3.572.0", + "licenseFile": "node_modules/@aws-sdk/s3-request-presigner/LICENSE", + "licenseUrl": "https://github.com/aws/aws-sdk-js-v3/blob/v3.572.0/LICENSE", + "licenseTextSource": "file", + "publisher": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, "@koa/router@12.0.1": { "name": "@koa/router", "version": "12.0.1", @@ -288,15 +314,15 @@ "licenseUrl": "https://github.com/octokit/rest.js/blob/v18.12.0/LICENSE", "licenseTextSource": "file" }, - "@slack/bolt@3.17.1": { + "@slack/bolt@3.18.0": { "name": "@slack/bolt", - "version": "3.17.1", + "version": "3.18.0", "range": "^3.7.0", "licenses": "MIT", "repoUrl": "https://github.com/slackapi/bolt", - "versionedRepoUrl": "https://github.com/slackapi/bolt/tree/v3.17.1", + "versionedRepoUrl": "https://github.com/slackapi/bolt/tree/v3.18.0", "licenseFile": "node_modules/@slack/bolt/LICENSE", - "licenseUrl": "https://github.com/slackapi/bolt/blob/v3.17.1/LICENSE", + "licenseUrl": "https://github.com/slackapi/bolt/blob/v3.18.0/LICENSE", "licenseTextSource": "file", "publisher": "Slack Technologies, LLC" }, @@ -350,6 +376,19 @@ "licenseTextSource": "file", "publisher": "Caolan McMahon" }, + "aws-sdk@2.1618.0": { + "name": "aws-sdk", + "version": "2.1618.0", + "range": "^2.1604.0", + "licenses": "Apache-2.0", + "repoUrl": "https://github.com/aws/aws-sdk-js", + "versionedRepoUrl": "https://github.com/aws/aws-sdk-js/tree/v2.1618.0", + "licenseFile": "node_modules/aws-sdk/LICENSE.txt", + "licenseUrl": "https://github.com/aws/aws-sdk-js/blob/v2.1618.0/LICENSE.txt", + "licenseTextSource": "file", + "publisher": "Amazon Web Services", + "url": "https://aws.amazon.com/" + }, "c8@8.0.1": { "name": "c8", "version": "8.0.1", @@ -363,15 +402,15 @@ "publisher": "Ben Coe", "email": "ben@npmjs.com" }, - "clean-jsdoc-theme@4.2.18": { + "clean-jsdoc-theme@4.3.0": { "name": "clean-jsdoc-theme", - "version": "4.2.18", + "version": "4.3.0", "range": "^4.2.18", "licenses": "MIT", "repoUrl": "https://github.com/ankitskvmdam/clean-jsdoc-theme", - "versionedRepoUrl": "https://github.com/ankitskvmdam/clean-jsdoc-theme/tree/v4.2.18", + "versionedRepoUrl": "https://github.com/ankitskvmdam/clean-jsdoc-theme/tree/v4.3.0", "licenseFile": "node_modules/clean-jsdoc-theme/LICENSE", - "licenseUrl": "https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/v4.2.18/LICENSE", + "licenseUrl": "https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/v4.3.0/LICENSE", "licenseTextSource": "file", "publisher": "Ank" }, @@ -441,15 +480,15 @@ "publisher": "Michael Radionov", "url": "https://github.com/mradionov" }, - "eslint-plugin-jsdoc@48.2.3": { + "eslint-plugin-jsdoc@48.2.4": { "name": "eslint-plugin-jsdoc", - "version": "48.2.3", + "version": "48.2.4", "range": "^48.0.5", "licenses": "BSD-3-Clause", "repoUrl": "https://github.com/gajus/eslint-plugin-jsdoc", - "versionedRepoUrl": "https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.2.3", + "versionedRepoUrl": "https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.2.4", "licenseFile": "node_modules/eslint-plugin-jsdoc/LICENSE", - "licenseUrl": "https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.2.3/LICENSE", + "licenseUrl": "https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.2.4/LICENSE", "licenseTextSource": "file", "publisher": "Gajus Kuizinas", "email": "gajus@gajus.com", @@ -544,15 +583,15 @@ "publisher": "Typicode", "email": "typicode@gmail.com" }, - "jsdoc@4.0.2": { + "jsdoc@4.0.3": { "name": "jsdoc", - "version": "4.0.2", + "version": "4.0.3", "range": "^4.0.0", "licenses": "Apache-2.0", "repoUrl": "https://github.com/jsdoc/jsdoc", - "versionedRepoUrl": "https://github.com/jsdoc/jsdoc/tree/v4.0.2", + "versionedRepoUrl": "https://github.com/jsdoc/jsdoc/tree/v4.0.3", "licenseFile": "node_modules/jsdoc/LICENSE.md", - "licenseUrl": "https://github.com/jsdoc/jsdoc/blob/v4.0.2/LICENSE.md", + "licenseUrl": "https://github.com/jsdoc/jsdoc/blob/v4.0.3/LICENSE.md", "licenseTextSource": "file", "publisher": "Michael Mathews", "email": "micmath@gmail.com" @@ -684,6 +723,19 @@ "email": "kris@cixar.com", "url": "https://github.com/kriskowal" }, + "rfdc@1.3.1": { + "name": "rfdc", + "version": "1.3.1", + "range": "^1.3.1", + "licenses": "MIT", + "repoUrl": "https://github.com/davidmarkclements/rfdc", + "versionedRepoUrl": "https://github.com/davidmarkclements/rfdc/tree/v1.3.1", + "licenseFile": "node_modules/rfdc/LICENSE", + "licenseUrl": "https://github.com/davidmarkclements/rfdc/blob/v1.3.1/LICENSE", + "licenseTextSource": "file", + "publisher": "David Mark Clements", + "email": "david.clements@nearform.com" + }, "rimraf@2.7.1": { "name": "rimraf", "version": "2.7.1", @@ -723,15 +775,15 @@ "licenseTextSource": "file", "publisher": "Christian Johansen" }, - "superagent@8.1.2": { + "superagent@9.0.2": { "name": "superagent", - "version": "8.1.2", - "range": "^8.1.2", + "version": "9.0.2", + "range": "^9.0.1", "licenses": "MIT", "repoUrl": "https://github.com/ladjs/superagent", - "versionedRepoUrl": "https://github.com/ladjs/superagent/tree/v8.1.2", + "versionedRepoUrl": "https://github.com/ladjs/superagent/tree/v9.0.2", "licenseFile": "node_modules/superagent/LICENSE", - "licenseUrl": "https://github.com/ladjs/superagent/blob/v8.1.2/LICENSE", + "licenseUrl": "https://github.com/ladjs/superagent/blob/v9.0.2/LICENSE", "licenseTextSource": "file", "publisher": "TJ Holowaychuk", "email": "tj@vision-media.ca"