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.
- package/CODE_OF_CONDUCT.md +5 -0
- package/CONTRIBUTING.md +71 -36
- package/LICENSE +201 -295
- package/NEWS.md +38 -0
- package/README.md +103 -674
- package/ROADMAP_Node.md +24 -0
- package/SECURITY.md +3 -18
- package/THIRD_PARTY_NOTICES.md +2836 -234
- package/THIRD_PARTY_NOTICES_ADDENDUM.md +213 -0
- package/api.js +5 -0
- package/bin/ca-gen.js +6 -0
- package/bin/cassandra-setup.sh +3 -0
- package/bin/clean.sh +3 -0
- package/bin/compare-bench-results.js +5 -0
- package/bin/docker-env-vars.sh +3 -0
- package/bin/docker-services.sh +3 -0
- package/bin/publish-docs.sh +3 -0
- package/bin/run-bench.js +5 -0
- package/bin/run-versioned-tests.sh +3 -0
- package/bin/smoke.sh +3 -0
- package/bin/ssl.sh +3 -0
- package/bin/test-naming-rules.js +6 -0
- package/bin/tracetractor +5 -0
- package/bin/travis-install-gcc5.sh +3 -0
- package/bin/travis-install-mongo.sh +3 -0
- package/bin/travis-node.sh +3 -0
- package/bin/travis-setup.sh +2 -0
- package/bin/update-ca-bundle.sh +3 -0
- package/bin/update-cats.sh +3 -0
- package/index.js +5 -0
- package/lib/adaptive-sampler.js +5 -0
- package/lib/agent.js +5 -0
- package/lib/aggregators/base-aggregator.js +5 -0
- package/lib/aggregators/event-aggregator.js +5 -0
- package/lib/aggregators/trace-aggregator.js +5 -0
- package/lib/attributes.js +18 -1
- package/lib/collector/api.js +5 -0
- package/lib/collector/facts.js +5 -0
- package/lib/collector/http-agents.js +5 -0
- package/lib/collector/key-parser.js +5 -0
- package/lib/collector/parse-response.js +5 -0
- package/lib/collector/remote-method.js +5 -0
- package/lib/collector/response.js +5 -0
- package/lib/collector/serverless.js +45 -13
- package/lib/collector/ssl/certificates.js +5 -0
- package/lib/config/attribute-filter.js +5 -0
- package/lib/config/default.js +5 -7
- package/lib/config/env.js +5 -6
- package/lib/config/harvest-config-validator.js +5 -0
- package/lib/config/hsm.js +5 -0
- package/lib/config/index.js +6 -1
- package/lib/config/lasp.js +5 -0
- package/lib/config/merge-server-config.js +5 -0
- package/lib/custom-events/custom-event-aggregator.js +5 -0
- package/lib/db/parse-sql.js +5 -0
- package/lib/db/parsed-statement.js +5 -0
- package/lib/db/query-parsers/sql.js +5 -0
- package/lib/db/query-sample.js +5 -0
- package/lib/db/query-trace-aggregator.js +5 -0
- package/lib/db/slow-query.js +5 -0
- package/lib/db/statement-matcher.js +5 -0
- package/lib/db/utils.js +5 -0
- package/lib/environment.js +7 -2
- package/lib/errors/error-collector.js +5 -0
- package/lib/errors/error-event-aggregator.js +5 -0
- package/lib/errors/error-trace-aggregator.js +5 -0
- package/lib/errors/helper.js +5 -0
- package/lib/errors/index.js +5 -0
- package/lib/feature_flags.js +7 -1
- package/lib/grpc/connection/states.js +5 -0
- package/lib/grpc/connection.js +5 -0
- package/lib/header-attributes.js +5 -0
- package/lib/header-processing.js +5 -0
- package/lib/instrumentation/@hapi/hapi.js +5 -0
- package/lib/instrumentation/amqplib.js +5 -0
- package/lib/instrumentation/bluebird.js +5 -0
- package/lib/instrumentation/cassandra-driver.js +5 -0
- package/lib/instrumentation/connect.js +5 -0
- package/lib/instrumentation/core/async_hooks.js +5 -0
- package/lib/instrumentation/core/child_process.js +5 -0
- package/lib/instrumentation/core/crypto.js +5 -0
- package/lib/instrumentation/core/dns.js +5 -0
- package/lib/instrumentation/core/domain.js +5 -0
- package/lib/instrumentation/core/fs.js +5 -0
- package/lib/instrumentation/core/globals.js +5 -0
- package/lib/instrumentation/core/http-outbound.js +5 -0
- package/lib/instrumentation/core/http.js +5 -0
- package/lib/instrumentation/core/inspector.js +5 -0
- package/lib/instrumentation/core/net.js +5 -0
- package/lib/instrumentation/core/timers.js +5 -0
- package/lib/instrumentation/core/zlib.js +5 -0
- package/lib/instrumentation/director.js +5 -0
- package/lib/instrumentation/express.js +5 -0
- package/lib/instrumentation/fastify/spec-builders.js +106 -0
- package/lib/instrumentation/fastify.js +79 -0
- package/lib/instrumentation/generic-pool.js +5 -0
- package/lib/instrumentation/hapi/hapi-17.js +5 -0
- package/lib/instrumentation/hapi/shared.js +5 -0
- package/lib/instrumentation/hapi.js +5 -0
- package/lib/instrumentation/ioredis.js +5 -0
- package/lib/instrumentation/memcached.js +5 -0
- package/lib/instrumentation/mongodb.js +5 -0
- package/lib/instrumentation/mysql.js +5 -0
- package/lib/instrumentation/oracle.js +5 -0
- package/lib/instrumentation/pg.js +5 -0
- package/lib/instrumentation/promise.js +5 -0
- package/lib/instrumentation/q.js +5 -0
- package/lib/instrumentation/redis.js +5 -0
- package/lib/instrumentation/restify.js +5 -0
- package/lib/instrumentation/vision.js +5 -0
- package/lib/instrumentation/when.js +5 -0
- package/lib/instrumentations.js +6 -0
- package/lib/logger.js +5 -0
- package/lib/metrics/index.js +5 -0
- package/lib/metrics/mapper.js +5 -0
- package/lib/metrics/metric-aggregator.js +4 -1
- package/lib/metrics/names.js +5 -0
- package/lib/metrics/normalizer/rule.js +5 -0
- package/lib/metrics/normalizer/tx_segment.js +5 -0
- package/lib/metrics/normalizer.js +5 -0
- package/lib/metrics/recorders/custom.js +5 -0
- package/lib/metrics/recorders/distributed-trace.js +5 -0
- package/lib/metrics/recorders/generic.js +5 -0
- package/lib/metrics/recorders/http.js +5 -0
- package/lib/metrics/recorders/http_external.js +5 -0
- package/lib/metrics/recorders/message-transaction.js +5 -0
- package/lib/metrics/recorders/other.js +5 -0
- package/lib/parse-proc-cpuinfo.js +5 -0
- package/lib/parse-proc-meminfo.js +5 -0
- package/lib/prioritized-attributes.js +17 -0
- package/lib/priority-queue.js +5 -0
- package/lib/proxy/grpc.js +5 -0
- package/lib/reservoir.js +5 -0
- package/lib/sampler.js +5 -0
- package/lib/serverless/api-gateway.js +5 -0
- package/lib/serverless/aws-lambda.js +5 -0
- package/lib/shim/conglomerate-shim.js +5 -0
- package/lib/shim/constants.js +5 -0
- package/lib/shim/datastore-shim.js +5 -0
- package/lib/shim/index.js +5 -0
- package/lib/shim/message-shim.js +5 -0
- package/lib/shim/promise-shim.js +5 -0
- package/lib/shim/shim.js +5 -0
- package/lib/shim/specs/index.js +5 -0
- package/lib/shim/transaction-shim.js +5 -0
- package/lib/shim/webframework-shim.js +7 -1
- package/lib/shimmer.js +10 -118
- package/lib/spans/create-span-event-aggregator.js +5 -0
- package/lib/spans/map-to-streaming-type.js +5 -0
- package/lib/spans/span-context.js +5 -0
- package/lib/spans/span-event-aggregator.js +5 -0
- package/lib/spans/span-event.js +5 -0
- package/lib/spans/span-streamer.js +5 -0
- package/lib/spans/streaming-span-attributes.js +5 -0
- package/lib/spans/streaming-span-event-aggregator.js +5 -0
- package/lib/spans/streaming-span-event.js +5 -0
- package/lib/stats/apdex.js +5 -0
- package/lib/stats/index.js +5 -5
- package/lib/system-info.js +5 -0
- package/lib/timer.js +5 -0
- package/lib/transaction/dt-payload.js +5 -0
- package/lib/transaction/handle.js +5 -0
- package/lib/transaction/index.js +5 -0
- package/lib/transaction/name-state.js +5 -0
- package/lib/transaction/trace/aggregator.js +5 -0
- package/lib/transaction/trace/exclusive-time-calculator.js +5 -0
- package/lib/transaction/trace/index.js +29 -1
- package/lib/transaction/trace/segment.js +5 -0
- package/lib/transaction/tracecontext.js +5 -0
- package/lib/transaction/tracer/index.js +5 -0
- package/lib/transaction/transaction-event-aggregator.js +5 -0
- package/lib/uninstrumented.js +5 -0
- package/lib/util/arity.js +5 -0
- package/lib/util/attribute-types.js +5 -0
- package/lib/util/byte-limit.js +5 -0
- package/lib/util/cat.js +5 -0
- package/lib/util/codec.js +5 -0
- package/lib/util/copy.js +5 -0
- package/lib/util/deep-equal.js +5 -0
- package/lib/util/flatten.js +5 -0
- package/lib/util/get.js +5 -0
- package/lib/util/hashes.js +5 -0
- package/lib/util/label-parser.js +5 -0
- package/lib/util/logger.js +5 -0
- package/lib/util/process-version.js +5 -0
- package/lib/util/properties.js +5 -0
- package/lib/util/sql/obfuscate.js +6 -1
- package/lib/util/stream-sink.js +5 -0
- package/lib/util/unwrapped-core.js +5 -0
- package/lib/util/urltils.js +5 -0
- package/lib/utilization/aws-info.js +5 -0
- package/lib/utilization/azure-info.js +5 -0
- package/lib/utilization/common.js +5 -0
- package/lib/utilization/docker-info.js +5 -0
- package/lib/utilization/gcp-info.js +5 -0
- package/lib/utilization/index.js +5 -0
- package/lib/utilization/kubernetes-info.js +5 -0
- package/lib/utilization/pcf-info.js +5 -0
- package/newrelic.js +16 -0
- package/package.json +11 -11
- package/stub_api.js +5 -0
- package/third_party_manifest.json +621 -0
- 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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
[
|
|
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
|
|
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
|
|
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
|
-
|
|
107
|
+
#### Running Tests
|
|
65
108
|
|
|
66
|
-
Running the test suite is simple.
|
|
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
|
|
71
|
-
creation) and run the unit tests in standalone mode, followed by
|
|
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
|
-
|
|
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.
|