Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

Upgrade to version 4.x

Thomas Watson Steen edited this page Nov 23, 2016 · 1 revision

The Opbeat Node.js agent version 4.0.0 have been released and includes a few breaking changes. This document is a guide on how to upgrade your code if you've been using v3.x previously.

Changes to existing API's

addFilter()

The callback given to the addFilter function was previously only called when ever an error was about to be sent to Opbeat. With the release of version 4.0.0, the callback will also be called once for each request that have been sampled as part of the Opbeat performance instrumentation.

Previously the callback was given the entire payload object that was about to be sent to Opbeat. Now only the follow 3 properties are exposed:

  • http
  • user
  • extra

See the addFilter() documentation for details.

captureError()

The callback optionally given to the captureError function was previously only called if the Opbeat agent was active. As of version 4.0.0 this callback will also be called when the agent is inactive. This is to provide a consistent flow no matter the state of the agent.

Removal of deprecated API's

filter

The filter option supplied when configuring Opbeat have been deprecated for a long time. In version 4.0.0 this config option have been completely removed. If you used this previously, use addFilter() instead.

Clone this wiki locally