Releases: snowplow/snowplow-golang-tracker
Version 3.1.0
Version 3.0.0
This is a major upgrade to the tracker with several breaking API changes. The main focus in this release has been to convert and move to a modular package structure. This lets us remove erroneous dependencies (like sqlite3 if we are using the go-memdb storage implementation) but equally this is ensuring that only the required dependencies for the implementation are being brought in as the packages now need to be explicitly pulled.
Golang Version Changes
With this release we are now testing against Golang v1.19, 1.18 and 1.17. Versions older than this are not guaranteed to work anymore. Please let us know if you need the Tracker to work against older versions in an issue and we can consider investigating this.
API Changes
tracker.InitPayload(): ThePayloadstruct now cannot be imported fromtrackerand instead needs to be imported frompkg/payloadto be initialized. The constructor has been renamed fromInitPayload->Initwithin this package.tracker.InitStorageMemory(): TheStorageMemoryimplementation has been moved fromtrackertopkg/storage/memory. The constructor has been renamed fromInitStorageMemory->Initwithin this package.tracker.InitStorageSQLite3(): TheStorageSQLite3implementation has been moved fromtrackertopkg/storage/sqlite3. The constructor has been renamed fromInitStorageSQLite3->Initwithin this package.tracker.Storage: For those that were providing a custom Storage layer implementation the interface now lives inpkg/storage/storageifaceand contains theStorageinterface andEventRowstruct.
In the core tracker module the only interface change left is in the Emitter where OptionStorage and OptionDbName have been removed. You must now always provide a Storage implementation to the Emitter by:
- Importing or defining a Storage implementation
- Setting it with the
RequireStoragefunction in the Emitter
As an example you can look at the below:
import (
storagememory "github.com/snowplow/snowplow-golang-tracker/v3/pkg/storage/memory"
tracker "github.com/snowplow/snowplow-golang-tracker/v3/tracker"
)
emitter := tracker.InitEmitter(tracker.RequireCollectorUri(collector),
tracker.RequireStorage(storagememory.Init()), // ADD THIS
tracker.OptionStorage(tracker.InitStorageMemory()), // REMOVE THIS
)Other API moves
All helper functions used in the library have been moved from tracker to pkg/common.
Full changelog
Version 2.4.1
Release 2.4.0
Release 2.3.0
New Features
- Add BlockingFlush utility function (#43)
Release 2.2.1
Bugs
- Fix module path to use root directory and v2 versioning (#40)
Release 2.2.0
Release 2.1.0
Version 2.0.0
Features
Bugs
- Ensure SQLite3 database cannot be left in a bad state (#15)