Snowplow C++ Tracker v0.3.0 released

We are pleased to announce the release of our C++ Tracker version 0.3.0.

This release brings support for desktop Linux by introducing a cURL HTTP request adapter and adding Linux-compatible helpers for retrieving desktop context and generating UUIDs.

Event classes have also been refactored to share a common Event base class and remove their nesting inside the Tracker class. They can now be tracked using a common tracker->track(event) method which returns the tracked event ID.

There are also improvements in the Emitter, which now provides a request callback with a list of emitted event IDs and their emit status. It also adds no-retry HTTP status codes (400, 401, 403, 410, and 422) that, when received from the Collector, result in event requests not being retried and the events being dropped. This retry behavior is configurable in the Emitter.

Finally, the storage layer is now customizable โ€“ you can define custom EventStore and SessionStore implementations for the event queue and session storage. The tracker still provides an SQLite option named SqliteStorage.

Enhancements:

  • Add support for Linux in HTTP client (#5)
  • Add CI build on Linux and update build instructions (#50)
  • Add support for Linux in desktop context (#47)
  • Add support for Linux when generating UUIDs (#46)
  • Use a common Event base class for all event types (#51)
  • Add emitter callback function (#7)
  • Add customizable no-retry HTTP status codes (#54)
  • Expose an interface for storage and make it configurable (#48)
  • Add a header file that includes all the published APIs (#55)

Upgrading to v0.3.0

There are a few breaking changes in this release. Please make sure to:

  1. Remove the Tracker:: prefix when referring to event types, e.g., use ScreenViewEvent() instead of Tracker::ScreenViewEvent().
  2. Use the common tracker->track(event) function to track events (instead of tracker->track_self_describing_event(event), tracker->track_screen_view(event), โ€ฆ).
  3. Use the event.set_context(context) and event.set_true_timestamp(tt) setters instead of accessing event.contexts and event.true_timestamp directly.
  4. Event IDs are no longer accessible from the event objects but are returned from the tracker->track(event) function.
  5. Emitter and ClientSession no longer accept database path string for SQLite database location but require an instance of SqliteStorage (or other storage implementation, see the docs).
  6. Use #include "snowplow.hpp" to import all public APIs of the tracker instead of including individual files.

Documentation: C++ Tracker - Snowplow Docs
On GitHub: Release Version 0.3.0 ยท snowplow/snowplow-cpp-tracker ยท GitHub

3 Likes