Skip to content

SDKs

Ruby SDK

Send server-side events, evaluate feature flags and report errors from Ruby and Rails.

Install

Gemfile
gem "tracklyne"
config/initializers/tracklyne.rb
TRACKLYNE = Tracklyne::Client.new(api_key: "tl_your_project_token", host: "https://tracklyne.com")
Rails.error.subscribe(Tracklyne::ErrorSubscriber.new(TRACKLYNE))

TRACKLYNE.capture(distinct_id: user.id, event: "invoice paid")

Feature flags and errors

billing.rb
TRACKLYNE.feature_enabled?("new-billing", user.id)
TRACKLYNE.capture_exception(e, distinct_id: user.id)

Ruby 3.1+, no dependencies. A background thread sends events, and the queue is flushed when the process exits.