Migration Guides

Upgrading from 2.X to 3.X

Updated Configuration settings

With 3.X we have moved configuration of the log level and ignored APIs to the dashboard. The following will no longer be configured via the in-agent configuration object:

  • log_level: Log level can now be set on an API by API basis in the dashboard. Select an API from the APIs panel to change the logging level.

  • ignored: APIs can now be ignored directly in the dashboard. Once an API is detected, it starts as disabled until you choose to enable logging.

Application-wide secrets

Secret keys are now specific to an application rather than an environment. You can continue using your existing keys, but we recommend using the new keys going forward.

Environment Names

You are no longer limited to three default environment types. To use the new environment detection features of Bearer, you need to:

  • Use the new application-specific secret key found in the Bearer Dashboard.

  • Set an environment name via ENV variables or the environment setting when initializing the Bearer Agent.

Do not configure an environment name before switching your application to the application specific secret key.

Upgrading from 0.X to 3.X

The 2.0 and 3.0 versions of the Node.js agent introduce our new asynchronous initialization process. To upgrade, your configuration will need to change from:

Before

const Bearer = require('@bearer/node-agent')
Bearer.init({ secretKey: "XXX-XXX-XXX-XXX" })

After

const Bearer = require('@bearer/node-agent')
Bearer.init({ secretKey: "XXX-XXX-XXX-XXX" })
.then(() => {
// Bearer initialized
})

For more on setting up the Bearer Agent, see the Quick Start.