newrelic 11.7.0 → 11.9.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.
package/NEWS.md CHANGED
@@ -1,3 +1,59 @@
1
+ ### v11.9.0 (2024-01-10)
2
+
3
+ #### Features
4
+
5
+ * Assign pkgVersion and id of all child shim instances when using shim.makeSpecializedShim with a ConglomerateShim instance ([#1941](https://github.com/newrelic/node-newrelic/pull/1941)) ([d3e393d](https://github.com/newrelic/node-newrelic/commit/d3e393da4ece46853b01f88878d487a1336634bf))
6
+
7
+ #### Bug fixes
8
+
9
+ * Dropped support for ElasticSearch < 7.16.0 ([#1940](https://github.com/newrelic/node-newrelic/pull/1940)) ([e017768](https://github.com/newrelic/node-newrelic/commit/e017768466c9ca80b16cf1b51155801c3ecf0cc4))
10
+ * Previously, New Relic's Node Agent instrumented ElasticSearch as early as v7.13.0, which was susceptible to crashing when using ElasticSearch's `.helper` API. ElasticSearch [fixed this bug in v7.16.0](https://github.com/elastic/elasticsearch-js/pull/1594), so we now support instrumentation from that version onward, and previous versions are noops.
11
+ * Removed extra / in openai framework metric name ([#1938](https://github.com/newrelic/node-newrelic/pull/1938)) ([7f586c3](https://github.com/newrelic/node-newrelic/commit/7f586c36f6fc119f4dac6e075468d90d43ff07fe))
12
+
13
+ #### Security improvements
14
+
15
+ * **deps:** bump follow-redirects from 1.15.2 to 1.15.4 ([#1942](https://github.com/newrelic/node-newrelic/pull/1942)) ([c1b04b6](https://github.com/newrelic/node-newrelic/commit/c1b04b69ce15173c88517b4baf920546e187ba07))
16
+
17
+ #### Miscellaneous chores
18
+
19
+ * Removed assigning unused metadata to LLM events ([#1932](https://github.com/newrelic/node-newrelic/pull/1932)) ([2f67d49](https://github.com/newrelic/node-newrelic/commit/2f67d496557d6192835e4b4b9cced8b7a2d932c0))
20
+
21
+ #### Tests
22
+
23
+ * Fix DNS lookup in remote-method test ([#1937](https://github.com/newrelic/node-newrelic/pull/1937)) ([4da2149](https://github.com/newrelic/node-newrelic/commit/4da2149f3c48137bc3a5005ff12d29b0c8bee1d7))
24
+ * removed console log ([#1939](https://github.com/newrelic/node-newrelic/pull/1939)) ([7d378aa](https://github.com/newrelic/node-newrelic/commit/7d378aa9ba7b0e529dc0da24b2ee767735631b16))
25
+ * updated abort controller test expected error message based on undici version ([#1935](https://github.com/newrelic/node-newrelic/pull/1935)) ([3e79cc7](https://github.com/newrelic/node-newrelic/commit/3e79cc77c8d10f84de71cf9a20c0c4f0642b7450))
26
+ * updated chat-completions tests to properly assert segments ([#1931](https://github.com/newrelic/node-newrelic/pull/1931)) ([10762a7](https://github.com/newrelic/node-newrelic/commit/10762a7c2c884c459af76d1877cd57641e572678))
27
+
28
+ ### v11.8.0 (2024-01-03)
29
+
30
+ #### Features
31
+
32
+ * Removed `api.setLlmMetadata` ([#1918](https://github.com/newrelic/node-newrelic/pull/1918)) ([cc4a975](https://github.com/newrelic/node-newrelic/commit/cc4a975a3f020648d183ce620e244ba0a09c286d))
33
+ * It will be assigned via `api.addCustomAttribute` with a prefix of `llm.` * The conversation_id will now be assigned from `llm.conversation_id` custom attribute
34
+ * Updated SQL obfuscation tokenizer to better handle negative numbers and boolean values.
35
+
36
+ #### Bug fixes
37
+
38
+ * Ensure opts.headers is defined in http instrumentation ([#1926](https://github.com/newrelic/node-newrelic/pull/1926)) ([7ea31a3](https://github.com/newrelic/node-newrelic/commit/7ea31a3c3ff45567cf102da6bbec4b9e68af9602))
39
+
40
+ #### Code refactoring
41
+
42
+ * Updated `lib/instrumentation/core/http.js` to reduce the cognitive complexity to an allowable value ([#1922](https://github.com/newrelic/node-newrelic/pull/1922)) ([4c30d97](https://github.com/newrelic/node-newrelic/commit/4c30d977ca74421cfa396c2f86383212e40475e1))
43
+ * Updated `lib/shim/promise-shim.js` to reduce the cognitive complexity ([#1924](https://github.com/newrelic/node-newrelic/pull/1924)) ([bd0a5dc](https://github.com/newrelic/node-newrelic/commit/bd0a5dc95c8077794c30c5ebe25f0e153aefb1b4))
44
+ * Updated `lib/shim/webframework-shim.js` to reduce the cognitive complexity ([#1927](https://github.com/newrelic/node-newrelic/pull/1927)) ([1ce371e](https://github.com/newrelic/node-newrelic/commit/1ce371e69fd8db7306137c749b9e5486aaacd434))
45
+
46
+ #### Miscellaneous chores
47
+
48
+ * **deps:** Updated @newrelic/security-agent to v0.6.0 ([#1929](https://github.com/newrelic/node-newrelic/pull/1929)) ([4e09927](https://github.com/newrelic/node-newrelic/commit/4e0992709f8bd07b941a8c7adf0aa51481b0282e))
49
+
50
+ #### Tests
51
+
52
+ * Refactored tests that were still using the tap mocha shim + chai to now use tap. ([#1919](https://github.com/newrelic/node-newrelic/pull/1919)) ([957529e](https://github.com/newrelic/node-newrelic/commit/957529e901115a16ed31c4663e460e4044d9a09d))
53
+ * removed access to deprecated `req._headers` and instead use `req.headers` ([#1923](https://github.com/newrelic/node-newrelic/pull/1923)) ([0ec2f66](https://github.com/newrelic/node-newrelic/commit/0ec2f6669bf90e54af8eddad7b42aa029a7ef517))
54
+ * updated the cross agent tests, made updates to tests based on fixture changes ([#1917](https://github.com/newrelic/node-newrelic/pull/1917)) ([2d666b6](https://github.com/newrelic/node-newrelic/commit/2d666b6e47d6ad7ecf14aa832a6ae1fbd15ee973))
55
+ * Updated `helper.randomPort` to use `crypto.randomInt` instead of `Math.random` by using crypto lib ([#1921](https://github.com/newrelic/node-newrelic/pull/1921)) ([9003791](https://github.com/newrelic/node-newrelic/commit/9003791e934efb7ab284406735b334bd9ae4872c))
56
+
1
57
  ### v11.7.0 (2023-12-14)
2
58
 
3
59
  #### Features
@@ -42,7 +42,6 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
42
42
  * [ajv](#ajv)
43
43
  * [async](#async)
44
44
  * [c8](#c8)
45
- * [chai](#chai)
46
45
  * [clean-jsdoc-theme](#clean-jsdoc-theme)
47
46
  * [commander](#commander)
48
47
  * [conventional-changelog-conventionalcommits](#conventional-changelog-conventionalcommits)
@@ -927,7 +926,7 @@ Apache License
927
926
 
928
927
  ### @newrelic/security-agent
929
928
 
930
- This product includes source derived from [@newrelic/security-agent](https://github.com/newrelic/csec-node-agent) ([v0.5.0](https://github.com/newrelic/csec-node-agent/tree/v0.5.0)), distributed under the [New Relic Pre-Release License](https://github.com/newrelic/csec-node-agent/blob/v0.5.0/LICENSE):
929
+ This product includes source derived from [@newrelic/security-agent](https://github.com/newrelic/csec-node-agent) ([v0.6.0](https://github.com/newrelic/csec-node-agent/tree/v0.6.0)), distributed under the [New Relic Pre-Release License](https://github.com/newrelic/csec-node-agent/blob/v0.6.0/LICENSE):
931
930
 
932
931
  ```
933
932
  ## New Relic Pre-Release Software Notice
@@ -1263,7 +1262,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
1263
1262
 
1264
1263
  ### import-in-the-middle
1265
1264
 
1266
- This product includes source derived from [import-in-the-middle](https://github.com/DataDog/import-in-the-middle) ([v1.4.2](https://github.com/DataDog/import-in-the-middle/tree/v1.4.2)), distributed under the [Apache-2.0 License](https://github.com/DataDog/import-in-the-middle/blob/v1.4.2/LICENSE):
1265
+ This product includes source derived from [import-in-the-middle](https://github.com/DataDog/import-in-the-middle) ([v1.6.0](https://github.com/DataDog/import-in-the-middle/tree/v1.6.0)), distributed under the [Apache-2.0 License](https://github.com/DataDog/import-in-the-middle/blob/v1.6.0/LICENSE):
1267
1266
 
1268
1267
  ```
1269
1268
  Copyright 2021 Datadog, Inc.
@@ -2268,61 +2267,32 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2268
2267
 
2269
2268
  ```
2270
2269
 
2271
- ### chai
2272
-
2273
- This product includes source derived from [chai](https://github.com/chaijs/chai) ([v4.3.8](https://github.com/chaijs/chai/tree/v4.3.8)), distributed under the [MIT License](https://github.com/chaijs/chai/blob/v4.3.8/LICENSE):
2274
-
2275
- ```
2276
- MIT License
2277
-
2278
- Copyright (c) 2017 Chai.js Assertion Library
2279
-
2280
- Permission is hereby granted, free of charge, to any person obtaining a copy
2281
- of this software and associated documentation files (the "Software"), to deal
2282
- in the Software without restriction, including without limitation the rights
2283
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2284
- copies of the Software, and to permit persons to whom the Software is
2285
- furnished to do so, subject to the following conditions:
2286
-
2287
- The above copyright notice and this permission notice shall be included in all
2288
- copies or substantial portions of the Software.
2289
-
2290
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2291
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2292
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2293
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2294
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2295
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2296
- SOFTWARE.
2297
-
2298
- ```
2299
-
2300
2270
  ### clean-jsdoc-theme
2301
2271
 
2302
2272
  This product includes source derived from [clean-jsdoc-theme](https://github.com/ankitskvmdam/clean-jsdoc-theme) ([v4.2.10](https://github.com/ankitskvmdam/clean-jsdoc-theme/tree/v4.2.10)), distributed under the [MIT License](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/v4.2.10/LICENSE):
2303
2273
 
2304
2274
  ```
2305
- MIT License
2306
-
2307
- Copyright (c) 2019-2022 Ankit Kumar (अंकित कुमार)
2308
-
2309
- Permission is hereby granted, free of charge, to any person obtaining a copy
2310
- of this software and associated documentation files (the "Software"), to deal
2311
- in the Software without restriction, including without limitation the rights
2312
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2313
- copies of the Software, and to permit persons to whom the Software is
2314
- furnished to do so, subject to the following conditions:
2315
-
2316
- The above copyright notice and this permission notice shall be included in all
2317
- copies or substantial portions of the Software.
2318
-
2319
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2320
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2321
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2322
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2323
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2324
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2325
- SOFTWARE.
2275
+ MIT License
2276
+
2277
+ Copyright (c) 2019-2022 Ankit Kumar (अंकित कुमार)
2278
+
2279
+ Permission is hereby granted, free of charge, to any person obtaining a copy
2280
+ of this software and associated documentation files (the "Software"), to deal
2281
+ in the Software without restriction, including without limitation the rights
2282
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2283
+ copies of the Software, and to permit persons to whom the Software is
2284
+ furnished to do so, subject to the following conditions:
2285
+
2286
+ The above copyright notice and this permission notice shall be included in all
2287
+ copies or substantial portions of the Software.
2288
+
2289
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2290
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2291
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2292
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2293
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2294
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2295
+ SOFTWARE.
2326
2296
 
2327
2297
  ```
2328
2298
 
@@ -4375,13 +4345,13 @@ License: MIT
4375
4345
  By: DY
4376
4346
  Repository: <git@github.com:dfcreative/color-name.git>
4377
4347
 
4378
- > The MIT License (MIT)
4379
- > Copyright (c) 2015 Dmitry Ivanov
4380
- >
4381
- > 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:
4382
- >
4383
- > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
4384
- >
4348
+ > The MIT License (MIT)
4349
+ > Copyright (c) 2015 Dmitry Ivanov
4350
+ >
4351
+ > 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:
4352
+ >
4353
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
4354
+ >
4385
4355
  > 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.
4386
4356
 
4387
4357
  ----------------------------------------
@@ -8615,17 +8585,17 @@ License: 0BSD
8615
8585
  By: Microsoft Corp.
8616
8586
  Repository: <https://github.com/Microsoft/tslib.git>
8617
8587
 
8618
- > Copyright (c) Microsoft Corporation.
8619
- >
8620
- > Permission to use, copy, modify, and/or distribute this software for any
8621
- > purpose with or without fee is hereby granted.
8622
- >
8623
- > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8624
- > REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
8625
- > AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
8626
- > INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
8627
- > LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
8628
- > OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8588
+ > Copyright (c) Microsoft Corporation.
8589
+ >
8590
+ > Permission to use, copy, modify, and/or distribute this software for any
8591
+ > purpose with or without fee is hereby granted.
8592
+ >
8593
+ > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8594
+ > REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
8595
+ > AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
8596
+ > INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
8597
+ > LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
8598
+ > OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8629
8599
  > PERFORMANCE OF THIS SOFTWARE.
8630
8600
 
8631
8601
  ----------------------------------------
@@ -8636,26 +8606,26 @@ License: MIT
8636
8606
  By: Klaus Meinhardt
8637
8607
  Repository: <https://github.com/ajafff/tsutils>
8638
8608
 
8639
- > The MIT License (MIT)
8640
- >
8641
- > Copyright (c) 2017 Klaus Meinhardt
8642
- >
8643
- > Permission is hereby granted, free of charge, to any person obtaining a copy
8644
- > of this software and associated documentation files (the "Software"), to deal
8645
- > in the Software without restriction, including without limitation the rights
8646
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8647
- > copies of the Software, and to permit persons to whom the Software is
8648
- > furnished to do so, subject to the following conditions:
8649
- >
8650
- > The above copyright notice and this permission notice shall be included in all
8651
- > copies or substantial portions of the Software.
8652
- >
8653
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
8654
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
8655
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
8656
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8657
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
8658
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
8609
+ > The MIT License (MIT)
8610
+ >
8611
+ > Copyright (c) 2017 Klaus Meinhardt
8612
+ >
8613
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
8614
+ > of this software and associated documentation files (the "Software"), to deal
8615
+ > in the Software without restriction, including without limitation the rights
8616
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8617
+ > copies of the Software, and to permit persons to whom the Software is
8618
+ > furnished to do so, subject to the following conditions:
8619
+ >
8620
+ > The above copyright notice and this permission notice shall be included in all
8621
+ > copies or substantial portions of the Software.
8622
+ >
8623
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
8624
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
8625
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
8626
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8627
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
8628
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
8659
8629
  > SOFTWARE.
8660
8630
 
8661
8631
  ----------------------------------------
@@ -8666,60 +8636,60 @@ License: Apache-2.0
8666
8636
  By: Microsoft Corp.
8667
8637
  Repository: <https://github.com/Microsoft/TypeScript.git>
8668
8638
 
8669
- > Apache License
8670
- >
8671
- > Version 2.0, January 2004
8672
- >
8673
- > http://www.apache.org/licenses/
8674
- >
8675
- > TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8676
- >
8677
- > 1. Definitions.
8678
- >
8679
- > "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
8680
- >
8681
- > "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
8682
- >
8683
- > "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.
8684
- >
8685
- > "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
8686
- >
8687
- > "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
8688
- >
8689
- > "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.
8690
- >
8691
- > "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).
8692
- >
8693
- > "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.
8694
- >
8695
- > "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."
8696
- >
8697
- > "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.
8698
- >
8699
- > 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.
8700
- >
8701
- > 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.
8702
- >
8703
- > 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:
8704
- >
8705
- > You must give any other recipients of the Work or Derivative Works a copy of this License; and
8706
- >
8707
- > You must cause any modified files to carry prominent notices stating that You changed the files; and
8708
- >
8709
- > 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
8710
- >
8711
- > 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.
8712
- >
8713
- > 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.
8714
- >
8715
- > 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.
8716
- >
8717
- > 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.
8718
- >
8719
- > 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.
8720
- >
8721
- > 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.
8722
- >
8639
+ > Apache License
8640
+ >
8641
+ > Version 2.0, January 2004
8642
+ >
8643
+ > http://www.apache.org/licenses/
8644
+ >
8645
+ > TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8646
+ >
8647
+ > 1. Definitions.
8648
+ >
8649
+ > "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
8650
+ >
8651
+ > "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
8652
+ >
8653
+ > "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.
8654
+ >
8655
+ > "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
8656
+ >
8657
+ > "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
8658
+ >
8659
+ > "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.
8660
+ >
8661
+ > "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).
8662
+ >
8663
+ > "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.
8664
+ >
8665
+ > "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."
8666
+ >
8667
+ > "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.
8668
+ >
8669
+ > 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.
8670
+ >
8671
+ > 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.
8672
+ >
8673
+ > 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:
8674
+ >
8675
+ > You must give any other recipients of the Work or Derivative Works a copy of this License; and
8676
+ >
8677
+ > You must cause any modified files to carry prominent notices stating that You changed the files; and
8678
+ >
8679
+ > 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
8680
+ >
8681
+ > 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.
8682
+ >
8683
+ > 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.
8684
+ >
8685
+ > 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.
8686
+ >
8687
+ > 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.
8688
+ >
8689
+ > 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.
8690
+ >
8691
+ > 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.
8692
+ >
8723
8693
  > END OF TERMS AND CONDITIONS
8724
8694
 
8725
8695
  ----------------------------------------
package/api.js CHANGED
@@ -1869,28 +1869,4 @@ API.prototype.setErrorGroupCallback = function setErrorGroupCallback(callback) {
1869
1869
  this.agent.errors.errorGroupCallback = callback
1870
1870
  }
1871
1871
 
1872
- /**
1873
- * Function for assigning metadata to all LLM events. This should only
1874
- * be called once in your application and before executing any openai, bedrock,
1875
- * langchain, generative AI methods.
1876
- *
1877
- * If passing in metadata via `api.recordLlmFeedbackEvent`, it will take precedence
1878
- * over what is assigned via this method.
1879
- *
1880
- * @param {object} metadata key/value metadata to be assigned to all LLM Events on creation
1881
- * @example
1882
- * newrelic.setLlmMetadata({ type: 'openai', framework: 'express', region: 'us' })
1883
- */
1884
- API.prototype.setLlmMetadata = function setLlmMetadata(metadata) {
1885
- const metric = this.agent.metrics.getOrCreateMetric(NAMES.SUPPORTABILITY.API + '/setLlmMetadata')
1886
- metric.incrementCallCount()
1887
-
1888
- if (!isSimpleObject(metadata)) {
1889
- logger.warn('metadata must be an object, not assigning LLM metadata.')
1890
- return
1891
- }
1892
-
1893
- this.agent.llm.metadata = metadata
1894
- }
1895
-
1896
1872
  module.exports = API
@@ -20,10 +20,10 @@ const { isNotEmpty } = require('../../util/objects')
20
20
  */
21
21
  module.exports = function initialize(_agent, elastic, _moduleName, shim) {
22
22
  const pkgVersion = shim.pkgVersion
23
- if (semver.lt(pkgVersion, '7.13.0')) {
23
+ if (semver.lt(pkgVersion, '7.16.0')) {
24
24
  shim &&
25
25
  shim.logger.debug(
26
- `ElasticSearch support is for versions 7.13.0 and above. Not instrumenting ${pkgVersion}.`
26
+ `ElasticSearch support is for versions 7.16.0 and above. Not instrumenting ${pkgVersion}.`
27
27
  )
28
28
  return
29
29
  }
@@ -70,6 +70,7 @@ function queryParser(params) {
70
70
  } else if (Array.isArray(params.bulkBody) && params.bulkBody.length) {
71
71
  queryParam = params.bulkBody
72
72
  }
73
+ // The helper interface provides a simpler API:
73
74
 
74
75
  const query = JSON.stringify(queryParam)
75
76
 
@@ -138,6 +138,8 @@ function instrumentRequest(agent, opts, makeRequest, hostname, segment) {
138
138
  const transaction = segment.transaction
139
139
  const outboundHeaders = Object.create(null)
140
140
 
141
+ opts.headers = opts.headers || {}
142
+
141
143
  synthetics.assignHeadersToOutgoingRequest(agent.config, transaction, outboundHeaders)
142
144
  maybeAddDtCatHeaders(agent, transaction, outboundHeaders, opts?.headers)
143
145
  opts.headers = assignOutgoingHeaders(opts.headers, outboundHeaders)