Snowplow Ruby Tracker 0.6.0 released

17 August 2016  •  Ed Lewis

We are pleased to announce the release of version 0.6.0 of the Snowplow Ruby Tracker. This release introduces true timestamp support, and marks the end of our support for Ruby 1.9.3.

Read on for more detail on:

  1. True timestamp support
  2. Device-sent timestamp support
  3. Self describing events
  4. Upgrading
  5. Getting help

1. True timestamp support

True timestamps in Snowplow are a way to indicate that you really trust the time given as accurate; this is particularly useful if you are using a tracker to “replay” events with definitive timestamps into Snowplow. You can find out more about how time is handled in Snowplow in our blog post here.

All the tracking methods in the Ruby Tracker now support sending this timestamp by using a “Timestamp” object. This is not a breaking API change and integers will be treated as before, as device timestamps (nil parameters will also be treated as device timestamps at the current time).

Here’s an example of how to attach a true timestamp to a page view event, as of this release:

e = SnowplowTracker::Emitter.new('localhost')
t = SnowplowTracker::Tracker.new(e)

t.track_page_view('http://example.com',
                  'Snowplow Ruby Tracker 0.6.0 released',
                  'http://www.referrer.com',
                   nil,
                   SnowplowTracker::TrueTimestamp.new(1471419787572))

The other tracking methods work in the same fashion, with the original timestamp field now accepting an integer or a Timestamp object indicating the type of timestamp.

2. Device-sent timestamp support

This release adds a device-sent timestamp to each event transmitted to a collector. This occurs automatically after upgrading to 0.6.0.

3. Track self describing events

After feedback, we’ve decided that a better description of “unstructured events” is “self describing events”. As such, and to keep the Ruby tracker inline with our other trackers , we’ve mirrored the “track_unstruct_event” API calls as “track_self_describing_event”. These are functionally the same. We will however look to de-support “track_unstruct_event” in future releases.

Both versions of this API call support the true timestamp, and this is again not an API-breaking change.

4. Upgrading

This release de-supports Ruby 1.9.3. The Snowplow Ruby Tracker 0.6.0 now supports Ruby 2.0.0 through to Ruby 2.3.1 (inclusive), as well as JRuby.

No breaking API changes are included in this release.

5. Getting help

These links may be useful:

The release notes are also available on GitHub.

If you have an idea for a new feature or want help getting things set up, please get in touch. Raise an issue in the GitHub repository if you find any bugs.