newrelic 6.10.0 → 6.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/CODE_OF_CONDUCT.md +5 -0
  2. package/CONTRIBUTING.md +71 -36
  3. package/LICENSE +201 -295
  4. package/NEWS.md +38 -0
  5. package/README.md +103 -674
  6. package/ROADMAP_Node.md +24 -0
  7. package/SECURITY.md +3 -18
  8. package/THIRD_PARTY_NOTICES.md +2836 -234
  9. package/THIRD_PARTY_NOTICES_ADDENDUM.md +213 -0
  10. package/api.js +5 -0
  11. package/bin/ca-gen.js +6 -0
  12. package/bin/cassandra-setup.sh +3 -0
  13. package/bin/clean.sh +3 -0
  14. package/bin/compare-bench-results.js +5 -0
  15. package/bin/docker-env-vars.sh +3 -0
  16. package/bin/docker-services.sh +3 -0
  17. package/bin/publish-docs.sh +3 -0
  18. package/bin/run-bench.js +5 -0
  19. package/bin/run-versioned-tests.sh +3 -0
  20. package/bin/smoke.sh +3 -0
  21. package/bin/ssl.sh +3 -0
  22. package/bin/test-naming-rules.js +6 -0
  23. package/bin/tracetractor +5 -0
  24. package/bin/travis-install-gcc5.sh +3 -0
  25. package/bin/travis-install-mongo.sh +3 -0
  26. package/bin/travis-node.sh +3 -0
  27. package/bin/travis-setup.sh +2 -0
  28. package/bin/update-ca-bundle.sh +3 -0
  29. package/bin/update-cats.sh +3 -0
  30. package/index.js +5 -0
  31. package/lib/adaptive-sampler.js +5 -0
  32. package/lib/agent.js +5 -0
  33. package/lib/aggregators/base-aggregator.js +5 -0
  34. package/lib/aggregators/event-aggregator.js +5 -0
  35. package/lib/aggregators/trace-aggregator.js +5 -0
  36. package/lib/attributes.js +18 -1
  37. package/lib/collector/api.js +5 -0
  38. package/lib/collector/facts.js +5 -0
  39. package/lib/collector/http-agents.js +5 -0
  40. package/lib/collector/key-parser.js +5 -0
  41. package/lib/collector/parse-response.js +5 -0
  42. package/lib/collector/remote-method.js +5 -0
  43. package/lib/collector/response.js +5 -0
  44. package/lib/collector/serverless.js +45 -13
  45. package/lib/collector/ssl/certificates.js +5 -0
  46. package/lib/config/attribute-filter.js +5 -0
  47. package/lib/config/default.js +5 -7
  48. package/lib/config/env.js +5 -6
  49. package/lib/config/harvest-config-validator.js +5 -0
  50. package/lib/config/hsm.js +5 -0
  51. package/lib/config/index.js +6 -1
  52. package/lib/config/lasp.js +5 -0
  53. package/lib/config/merge-server-config.js +5 -0
  54. package/lib/custom-events/custom-event-aggregator.js +5 -0
  55. package/lib/db/parse-sql.js +5 -0
  56. package/lib/db/parsed-statement.js +5 -0
  57. package/lib/db/query-parsers/sql.js +5 -0
  58. package/lib/db/query-sample.js +5 -0
  59. package/lib/db/query-trace-aggregator.js +5 -0
  60. package/lib/db/slow-query.js +5 -0
  61. package/lib/db/statement-matcher.js +5 -0
  62. package/lib/db/utils.js +5 -0
  63. package/lib/environment.js +7 -2
  64. package/lib/errors/error-collector.js +5 -0
  65. package/lib/errors/error-event-aggregator.js +5 -0
  66. package/lib/errors/error-trace-aggregator.js +5 -0
  67. package/lib/errors/helper.js +5 -0
  68. package/lib/errors/index.js +5 -0
  69. package/lib/feature_flags.js +7 -1
  70. package/lib/grpc/connection/states.js +5 -0
  71. package/lib/grpc/connection.js +5 -0
  72. package/lib/header-attributes.js +5 -0
  73. package/lib/header-processing.js +5 -0
  74. package/lib/instrumentation/@hapi/hapi.js +5 -0
  75. package/lib/instrumentation/amqplib.js +5 -0
  76. package/lib/instrumentation/bluebird.js +5 -0
  77. package/lib/instrumentation/cassandra-driver.js +5 -0
  78. package/lib/instrumentation/connect.js +5 -0
  79. package/lib/instrumentation/core/async_hooks.js +5 -0
  80. package/lib/instrumentation/core/child_process.js +5 -0
  81. package/lib/instrumentation/core/crypto.js +5 -0
  82. package/lib/instrumentation/core/dns.js +5 -0
  83. package/lib/instrumentation/core/domain.js +5 -0
  84. package/lib/instrumentation/core/fs.js +5 -0
  85. package/lib/instrumentation/core/globals.js +5 -0
  86. package/lib/instrumentation/core/http-outbound.js +5 -0
  87. package/lib/instrumentation/core/http.js +5 -0
  88. package/lib/instrumentation/core/inspector.js +5 -0
  89. package/lib/instrumentation/core/net.js +5 -0
  90. package/lib/instrumentation/core/timers.js +5 -0
  91. package/lib/instrumentation/core/zlib.js +5 -0
  92. package/lib/instrumentation/director.js +5 -0
  93. package/lib/instrumentation/express.js +5 -0
  94. package/lib/instrumentation/fastify/spec-builders.js +106 -0
  95. package/lib/instrumentation/fastify.js +79 -0
  96. package/lib/instrumentation/generic-pool.js +5 -0
  97. package/lib/instrumentation/hapi/hapi-17.js +5 -0
  98. package/lib/instrumentation/hapi/shared.js +5 -0
  99. package/lib/instrumentation/hapi.js +5 -0
  100. package/lib/instrumentation/ioredis.js +5 -0
  101. package/lib/instrumentation/memcached.js +5 -0
  102. package/lib/instrumentation/mongodb.js +5 -0
  103. package/lib/instrumentation/mysql.js +5 -0
  104. package/lib/instrumentation/oracle.js +5 -0
  105. package/lib/instrumentation/pg.js +5 -0
  106. package/lib/instrumentation/promise.js +5 -0
  107. package/lib/instrumentation/q.js +5 -0
  108. package/lib/instrumentation/redis.js +5 -0
  109. package/lib/instrumentation/restify.js +5 -0
  110. package/lib/instrumentation/vision.js +5 -0
  111. package/lib/instrumentation/when.js +5 -0
  112. package/lib/instrumentations.js +6 -0
  113. package/lib/logger.js +5 -0
  114. package/lib/metrics/index.js +5 -0
  115. package/lib/metrics/mapper.js +5 -0
  116. package/lib/metrics/metric-aggregator.js +4 -1
  117. package/lib/metrics/names.js +5 -0
  118. package/lib/metrics/normalizer/rule.js +5 -0
  119. package/lib/metrics/normalizer/tx_segment.js +5 -0
  120. package/lib/metrics/normalizer.js +5 -0
  121. package/lib/metrics/recorders/custom.js +5 -0
  122. package/lib/metrics/recorders/distributed-trace.js +5 -0
  123. package/lib/metrics/recorders/generic.js +5 -0
  124. package/lib/metrics/recorders/http.js +5 -0
  125. package/lib/metrics/recorders/http_external.js +5 -0
  126. package/lib/metrics/recorders/message-transaction.js +5 -0
  127. package/lib/metrics/recorders/other.js +5 -0
  128. package/lib/parse-proc-cpuinfo.js +5 -0
  129. package/lib/parse-proc-meminfo.js +5 -0
  130. package/lib/prioritized-attributes.js +17 -0
  131. package/lib/priority-queue.js +5 -0
  132. package/lib/proxy/grpc.js +5 -0
  133. package/lib/reservoir.js +5 -0
  134. package/lib/sampler.js +5 -0
  135. package/lib/serverless/api-gateway.js +5 -0
  136. package/lib/serverless/aws-lambda.js +5 -0
  137. package/lib/shim/conglomerate-shim.js +5 -0
  138. package/lib/shim/constants.js +5 -0
  139. package/lib/shim/datastore-shim.js +5 -0
  140. package/lib/shim/index.js +5 -0
  141. package/lib/shim/message-shim.js +5 -0
  142. package/lib/shim/promise-shim.js +5 -0
  143. package/lib/shim/shim.js +5 -0
  144. package/lib/shim/specs/index.js +5 -0
  145. package/lib/shim/transaction-shim.js +5 -0
  146. package/lib/shim/webframework-shim.js +7 -1
  147. package/lib/shimmer.js +10 -118
  148. package/lib/spans/create-span-event-aggregator.js +5 -0
  149. package/lib/spans/map-to-streaming-type.js +5 -0
  150. package/lib/spans/span-context.js +5 -0
  151. package/lib/spans/span-event-aggregator.js +5 -0
  152. package/lib/spans/span-event.js +5 -0
  153. package/lib/spans/span-streamer.js +5 -0
  154. package/lib/spans/streaming-span-attributes.js +5 -0
  155. package/lib/spans/streaming-span-event-aggregator.js +5 -0
  156. package/lib/spans/streaming-span-event.js +5 -0
  157. package/lib/stats/apdex.js +5 -0
  158. package/lib/stats/index.js +5 -5
  159. package/lib/system-info.js +5 -0
  160. package/lib/timer.js +5 -0
  161. package/lib/transaction/dt-payload.js +5 -0
  162. package/lib/transaction/handle.js +5 -0
  163. package/lib/transaction/index.js +5 -0
  164. package/lib/transaction/name-state.js +5 -0
  165. package/lib/transaction/trace/aggregator.js +5 -0
  166. package/lib/transaction/trace/exclusive-time-calculator.js +5 -0
  167. package/lib/transaction/trace/index.js +29 -1
  168. package/lib/transaction/trace/segment.js +5 -0
  169. package/lib/transaction/tracecontext.js +5 -0
  170. package/lib/transaction/tracer/index.js +5 -0
  171. package/lib/transaction/transaction-event-aggregator.js +5 -0
  172. package/lib/uninstrumented.js +5 -0
  173. package/lib/util/arity.js +5 -0
  174. package/lib/util/attribute-types.js +5 -0
  175. package/lib/util/byte-limit.js +5 -0
  176. package/lib/util/cat.js +5 -0
  177. package/lib/util/codec.js +5 -0
  178. package/lib/util/copy.js +5 -0
  179. package/lib/util/deep-equal.js +5 -0
  180. package/lib/util/flatten.js +5 -0
  181. package/lib/util/get.js +5 -0
  182. package/lib/util/hashes.js +5 -0
  183. package/lib/util/label-parser.js +5 -0
  184. package/lib/util/logger.js +5 -0
  185. package/lib/util/process-version.js +5 -0
  186. package/lib/util/properties.js +5 -0
  187. package/lib/util/sql/obfuscate.js +6 -1
  188. package/lib/util/stream-sink.js +5 -0
  189. package/lib/util/unwrapped-core.js +5 -0
  190. package/lib/util/urltils.js +5 -0
  191. package/lib/utilization/aws-info.js +5 -0
  192. package/lib/utilization/azure-info.js +5 -0
  193. package/lib/utilization/common.js +5 -0
  194. package/lib/utilization/docker-info.js +5 -0
  195. package/lib/utilization/gcp-info.js +5 -0
  196. package/lib/utilization/index.js +5 -0
  197. package/lib/utilization/kubernetes-info.js +5 -0
  198. package/lib/utilization/pcf-info.js +5 -0
  199. package/newrelic.js +16 -0
  200. package/package.json +11 -11
  201. package/stub_api.js +5 -0
  202. package/third_party_manifest.json +621 -0
  203. package/lib/injector.js +0 -161
@@ -0,0 +1,5 @@
1
+ ### Hello! We're glad you've joined us.
2
+
3
+ We believe participation in our community should be a harassment free experience for everyone.
4
+
5
+ Learn more about our guidelines and principles by reading our [Code of Conduct](https://opensource.newrelic.com/code-of-conduct/) on our Open Source Website.
package/CONTRIBUTING.md CHANGED
@@ -1,41 +1,84 @@
1
- # Guidelines for contributing code
1
+ # Guidelines for Contributing Code
2
2
 
3
3
  New Relic welcomes code contributions by the Node community to this module, and
4
4
  have taken effort to make this process easy for both contributors and our
5
5
  development team.
6
6
 
7
- When contributing, keep in mind that New Relic customers (that's you!) are
8
- running many different versions of Node, some of them pretty old. Changes that
9
- depend on the newest version of Node will probably be rejected, with prejudice
10
- if they replace something backwards compatible.
7
+ ## Process
11
8
 
12
- Also be aware that the instrumentation needs to work with a wide range of
13
- versions of the instrumented modules, and that code that looks nonsensical or
14
- overcomplicated may be that way for compatibility-related reasons. Read all the
15
- comments and check the related tests before deciding whether existing code is
16
- incorrect.
9
+ ### Feature Requests
17
10
 
18
- ## Testing
11
+ Feature requests should be submitted in the [Issue tracker](../../issues), with
12
+ a description of the expected behavior & use case. Before submitting an Issue,
13
+ please search for similar ones in the [closed
14
+ issues](../../issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement).
15
+
16
+ ### Pull Requests
17
+
18
+ We can only accept PRs for version v6.11.0 or greater due to open source
19
+ licensing restrictions.
20
+
21
+ ### Code of Conduct
22
+
23
+ Before contributing please read the [code of conduct](./CODE_OF_CONDUCT.md)
24
+
25
+ Note that our [code of conduct](./CODE_OF_CONDUCT.md) applies to all platforms
26
+ and venues related to this project; please follow it in all your interactions
27
+ with the project and its participants.
28
+
29
+ ### Contributor License Agreement
30
+
31
+ Keep in mind that when you submit your Pull Request, you'll need to sign the
32
+ CLA via the click-through using CLA-Assistant. If you'd like to execute our
33
+ corporate CLA, or if you have any questions, please drop us an email at
34
+ opensource@newrelic.com.
35
+
36
+ For more information about CLAs, please check out Alex Russell’s excellent
37
+ post, [“Why Do I Need to Sign
38
+ This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
39
+
40
+ ### Slack
41
+
42
+ We host a public Slack with a dedicated channel for contributors and
43
+ maintainers of open source projects hosted by New Relic. If you are
44
+ contributing to this project, you're welcome to request access to the
45
+ \#oss-contributors channel in the newrelicusers.slack.com workspace. To request
46
+ access, see https://newrelicusers-signup.herokuapp.com/.
47
+
48
+ ## PR Guidelines
49
+
50
+ ### Version Support
51
+
52
+ When contributing, keep in mind that New Relic customers (that's you!) are running many different versions of Node, some of them pretty old. Changes that depend on the newest version of Node will probably be rejected, especially if they replace something backwards compatible.
53
+
54
+ Be aware that the instrumentation needs to work with a wide range of versions of the instrumented modules, and that code that looks nonsensical or overcomplicated may be that way for compatibility-related reasons. Read all the comments and check the related tests before deciding whether existing code is incorrect.
55
+
56
+ If you’re planning on contributing a new feature or an otherwise complex contribution, we kindly ask you to start a conversation with the maintainer team by opening up an Github issue first.
57
+
58
+ ### General Guidelines
59
+
60
+ In general, we try to limit adding third-party production dependencies. If one is necessary, please be prepared to make a clear case for the need.
61
+
62
+ ### Coding Style Guidelines/Conventions
63
+
64
+ We use eslint to enforce certain coding standards. Please see our [.eslintrc](./.eslintrc.js) file for specific rule configuration.
65
+
66
+ ### Testing Guidelines
19
67
 
20
68
  The agent includes a suite of unit and functional tests which should be used to
21
69
  verify your changes don't break existing functionality.
22
70
 
23
71
  Unit tests are stored in `test/`. They're written in
24
- [Mocha](https://mochajs.org), and have the extension
25
- `.test.js`.
72
+ [node-tap](https://github.com/isaacs/node-tap), and have the extension `.test.js`.
26
73
 
27
74
  Generic functional tests are stored in `test/integration/`. They're written in
28
75
  [node-tap](https://github.com/isaacs/node-tap), and have the extension
29
76
  `.tap.js`.
30
77
 
31
- Functional tests against specific versions of instrumented modules are stored in
32
- `test/versioned/`. They are also written in `node-tap`.
33
-
34
- There are some other tests in `test/versioned-node/`. They are works in progress
35
- and not ready for general-purpose use.
78
+ Functional tests against specific versions of instrumented modules are stored
79
+ in `test/versioned/`. They are also written in `node-tap`.
36
80
 
37
-
38
- ### Setup
81
+ #### Setup
39
82
 
40
83
  To run the tests you need an openssl command-line binary, and some services:
41
84
 
@@ -53,30 +96,30 @@ If you use macOS or Windows, install [Docker Desktop]
53
96
  to download and launch docker containers for each of the above services.
54
97
 
55
98
  If you have these services available on non-standard ports or elsewhere on your
56
- network, you can use the following environment variables to tell the tests where
57
- they are:
99
+ network, you can use the following environment variables to tell the tests
100
+ where they are:
58
101
 
59
102
  * NR_NODE\_TEST_<service>\_HOST
60
103
  * NR_NODE\_TEST_<service>\_PORT
61
104
 
62
105
  The service token is the all-caps version of the service name listed above.
63
106
 
64
- ### Running the tests
107
+ #### Running Tests
65
108
 
66
- Running the test suite is simple. Just run:
109
+ Running the test suite is simple. Just run:
67
110
 
68
111
  npm test
69
112
 
70
- This will install all the necessary modules (and do any required SSL certificate
71
- creation) and run the unit tests in standalone mode, followed by the functional
72
- tests if all of the unit tests pass.
113
+ This will install all the necessary modules (and do any required SSL
114
+ certificate creation) and run the unit tests in standalone mode, followed by
115
+ the functional tests if all of the unit tests pass.
73
116
 
74
117
  If you don't feel like dealing with the hassle of setting up the servers, just
75
118
  the unit tests can be run with:
76
119
 
77
120
  npm run unit
78
121
 
79
- ### Writing tests
122
+ #### Writing Tests
80
123
 
81
124
  For most contributions it is strongly recommended to add additional tests which
82
125
  exercise your changes. This helps us efficiently incorporate your changes into
@@ -90,11 +133,3 @@ There are some rare cases where code changes do not result in changed
90
133
  functionality (e.g. a performance optimization) and new tests are not required.
91
134
  In general, including tests with your pull request dramatically increases the
92
135
  chances it will be accepted.
93
-
94
- ## And finally...
95
-
96
- You are welcome to send pull requests to us - however, by doing so you agree
97
- that you are granting New Relic a non-exclusive, non-revokable, no-cost license
98
- to use the code, algorithms, patents, and ideas in that code in our products if
99
- we so choose. You also agree the code is provided as-is and you provide no
100
- warranties as to its fitness or correctness for any purpose.