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()
: ThePayload
struct now cannot be imported fromtracker
and instead needs to be imported frompkg/payload
to be initialized. The constructor has been renamed fromInitPayload
->Init
within this package.tracker.InitStorageMemory()
: TheStorageMemory
implementation has been moved fromtracker
topkg/storage/memory
. The constructor has been renamed fromInitStorageMemory
->Init
within this package.tracker.InitStorageSQLite3()
: TheStorageSQLite3
implementation has been moved fromtracker
topkg/storage/sqlite3
. The constructor has been renamed fromInitStorageSQLite3
->Init
within this package.tracker.Storage
: For those that were providing a custom Storage layer implementation the interface now lives inpkg/storage/storageiface
and contains theStorage
interface andEventRow
struct.
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
RequireStorage
function 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)