We’re hugely excited to announce version 0.5.0 of the Snowplow Scala Tracker!
This release bring plenty of new features, such as ecommerce event tracking, Google Cloud Compute Engine context, a new trackError
method and callbacks that make easy to track if collector is receiving your events.
Many thanks to the team at long-standing Snowplow corporate contributors LiveIntent for their huge contributions to this release.
Read below to learn more about new features.
Ecommerce events
Thanks to @christoph-buente of LiveIntent, Scala Tracker now has following new tracking methods:
trackAddToCart
trackRemoveFromCart
trackTransaction
trackTransactionItem
All methods have signatures compatible with other Snowplow trackers.
Callbacks
Now your Scala applications are able to notify DevOps that Snowplow collector for some reasons does not accept events. This can be done using emitter callbacks.
trackError
Another new resilience-related feature is the trackError
method - another LiveIntent contribution, this time from Ander Parra. This lets you track errors in your application (as opposed to callbacks that used to catch errors in tracker-collector themselves), so you could find out what components of your application fail more often. trackError
receives a JVM Throwable
and turns it into iglu:com.snowplowanalytics.snowplow/application_error/jsonschema/1-0-1
event as our Android and JavaScript trackers do.
val result = try {
fetchData()
} catch {
case scala.util.control.NonFatal(e) =>
tracker.trackError(e)
fallbackValue()
}
Google Cloud Compute Engine context
As Snowplow gradually moving towards GCP support, we decided to implement instance metadata context that will allow us to join pipeline execution steps with instance metadata.