Migrating from v3 to v4
Version 4 is a major release with several breaking changes to defaults and behavior.
Behavior changesโ
Removed the use of the got library in favor of fetchโ
The tracker no longer needs the got library for making HTTP requests to the collector. This has been replaced with the fetch API. The change has an effect on the public API of the tracker which had to previously accommodate the got library โ the following change results from this.
Removed tracker
and emitter
functions in favor or newTracker
โ
The initialization of a tracker instance has changed โ instead of initializing an emitter (using gotEmitter
) and tracker (using tracker
) separately, the SDK handles initialization of both using the newTracker
call.
The newTracker
call now accepts configuration objects for the tracker and emitter as arguments.
See the new initialization options here.
Dropped support for older Node.JSโ
The support for the following Node.JS versions has been dropped:
- Drop Node.js <18 support