Telesink Ruby SDK

Kyrylo Silin
Kyrylo Silin
Telesink founder

Telesink is built in Ruby on Rails, so the first official SDK had to be Ruby. It’s now here: the telesink gem.

I kept it tiny on purpose. It has no runtime dependencies except logger. Install the gem, set one environment variable, and send an event.

Installation

Add this line to your Gemfile:

gem "telesink"

Then run:

bundle install

Configuration

The SDK is configured entirely through environment variables. No classes, no blocks, no YAML.

Set your sink endpoint:

export TELESINK_ENDPOINT=https://app.telesink.com/api/v1/sinks/your_sink_token_here/events

For self-hosted instances, just change the URL to point at your own server.

To disable tracking (for example in tests or local development):

export TELESINK_DISABLED=true

Usage

Telesink.track(
  event: "User signed up",
  text: "[email protected]",
  emoji: "👤",
  properties: {
    plan: "pro",
    source: "landing_page",
    user_id: 123,
    email_address: "[email protected]"
  },
  occurred_at: Time.now,        # optional, defaults to now
  idempotency_key: "my-key"     # optional, UUID generated if omitted
)

The method returns true if the event was sent successfully and false otherwise (disabled, missing endpoint, or network error). It will never raise exceptions. Errors are logged to STDERR, and the call fails quietly. Event tracking should not break your app.

What’s under the hood

The entire gem is around 60 lines of plain Ruby using only the standard library. It:

  • adds an Idempotency-Key header automatically
  • tags every payload with sdk: { name: "telesink.ruby", version: "..." }
  • times out after 3 seconds
  • works with both the hosted version and any self-hosted instance

Next steps

Ruby was the obvious first language. JavaScript, Python, Go, and PHP are next on the list. Let me know on X which one you want first.

The complete source is at github.com/telesink/telesink-ruby. It is MIT licensed.

Now go connect your app and watch events appear in your Telesink feed.

Follow along on X at @kyrylo.