• /
  • ログイン
  • 無料アカウント

Update the Node.js agent

To take full advantage of New Relic's latest features, enhancements, and important security patches, we recommend you update your Node.js agent to the latest version. For additional information about specific agent updates, refer to the Node.js agent release notes. The release notes include a download link when applicable, plus instructions to download and install the latest version.

  • If the newrelic module is listed in your package.json, run npm install.
  • If you want to target just the newrelic module, run npm update newrelic.

Recommendation: Test your updated version before moving it into production. If you have problems, follow the Node.js agent troubleshooting procedures.

Upgrade to Node.js agent version 6

Before upgrading to Node.js version 6, review this information for major changes.

Major changes with Node.js agent v6

Comments

Upgraded official Koa framework instrumentation module to v3.0.0

  • v6: Added support for @koa/router up to v8.0.2. @koa/router v8.0.3 and greater are currently unsupported.
  • v6: Added support for Node v12 and removed support for Node v6, 7, and 9. The minimum supported version is Node v8.
  • Also see New Relic's Koa Release Notes on Github..

Removed deprecated max_samples_per_minute configuration parameter, which is replaced by max_samples_stored behavior

  • v1 - v5: max_samples_per_minute defined the maximum number of events the agent collects per minute. If your application previously used max_samples_per_minute as an upper bound, you may need to lower the threshold to a valid maximum to avoid data being dropped on the server. We recommend less than 10k.
  • v5: In agent v5 and lower, max_samples_stored defined the maximum number of events the agent stores if it's unable to communicate with the New Relic collector.
  • v6: The new behavior of max_samples_stored defines the maximum number of events the agent collects per minute. If there are more than this number, the agent collects a statistical sampling. This usage of the configuration is consistent with the other APM agents.
  • Troubleshooting tips: If you're missing event data, increase the value of max_samples_stored or revert to the default value. The value of max_samples_stored should not be over 10,000.

Node version support

Node 8 is the earliest version supported by the New Relic Node.js v6 agent. Node 6, 7 and 9 are not supported by v6. Customers running Node 6, 7 and 9 have two options:

  • Upgrade to a supported version of Node and take advantage of the New Relic Node.js v6 agent's new features.
  • Remain on New Relic Node.js v5 agent without the ability to use new features only available with update agent versions.

Node 8 no longer receive updates, but New Relic will continue to support these versions of Node for the time being.

ヒント

Upgrade to a newer version of Node as soon as possible. The next major version of the New Relic Node.js agent will likely remove support for Node 8.

Upgrade to Node.js agent version 5

Before upgrading to Node.js v5, review this information for major changes. Also see New Relic's Node.js v5 migration guide on GitHub.

Major changes with Node.js v5 agent

Comments

Removed deprecated addCustomParameter methods.

Removed deprecated create*Transaction methods.

Removed deprecated createTracer method.

  • v3 - v4: Starting in agent v3.3.0, this method was marked as deprecated in favor of newrelic.startSegment().
  • v5: Applications must update to newrelic.startSegment().

Removed node-cassandra-cql instrumentation.

  • v4: Applications using the npm package node-cassandra-cql would get datastore metrics for Cassandra.
  • v5: Applications must migrate to the cassandra-driver package to get Cassandra datastore metrics. This module is actively maintained by the same developers. The node-cassandra-cql package was abandoned in February of 2014 in favor of the cassandra-driver package.

Removed deprecated capture_params and ignored_params configurations.

  • v2 - v4: Starting in agent v2.7.0, these configuration parameters caused a warning to be logged, and the values were automatically upgraded to the new attributes configurations.
  • v5: A warning will still be logged but the configuration is ignored, and no automatic upgrading happens any more.
  • Troubleshooting tips: If your application had parameters listed in the ignored_params configuration, you will need to move them to attributes.exclude.

Node version support

Node 6 is the earliest version supported by the New Relic Node.js v5 agent. Node 4 and 5 are not supported by v5. Customers running Node 4 or 5 have two options:

  • Upgrade to a supported version of Node and take advantage of the New Relic Node.js v5 agent's new features.
  • Remain on New Relic Node.js v4 agent without the ability to use new features only available with update agent versions.

Node 7 and 9 no longer receive updates, but New Relic will continue to support these versions of Node for the time being.

ヒント

Upgrade to a newer version of Node as soon as possible. The next major version of the New Relic Node.js agent will likely remove support for Node 6 and 7.

Feature flags as of v5

As of New Relic for Node.js v5:

  • custom_instrumentation: This feature is no longer configurable.
  • custom_metrics: This feature is no longer configurable.
  • synthetics: This feature is no longer configurable.
  • native_metrics: This feature is now controlled by the plugins.native_metrics.enabled configuration value.

Upgrade to Node.js agent version 4

Before upgrading to Node.js v4, review this information for major changes. Also see New Relic's Node.js v4 migration guide on GitHub.

Upgrade to Node.js agent version 3

Before upgrading to Node.js v3, review this information for major changes. Also see New Relic's Node.js v3 migration guide on GitHub.

Upgrade to Node.js agent version 2

Before upgrading to Node.js v2, review this information for major changes. Also see New Relic's Node.js v2 migration guide on GitHub.

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.