TopStats SDK

Ruby analytics SDK

Pure-stdlib Ruby (net/http, JSON) with a background flusher thread and keyword-argument capture. The rails package adds one Rack middleware covering Rails and Sinatra with real route templates, auto-wired by a Railtie.

Install

gem install topstats-analytics  # RubyGems soon; bundle from the repo today

Capture your first event

client = TopStats::Client.new(ENV.fetch("TOPSTATS_API_KEY"),
  default_source: "api")

client.capture("import_finished", { "rows" => 3200 },
  actor: "org-12", actor_label: "Acme")
client.shutdown

Behaviour you can rely on

Every other language

Your first event is minutes away.

Twelve language SDKs, middleware for nine web frameworks, plugins for seven games, and raw HTTP - all working today. Free plan, 2M events a month, no card.