Skip to content

telesink/telesink-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telesink SDK for Ruby

Know what your product is doing. Right now.

Official Ruby client for telesink.com - real-time event tracking.

Requirements

  • Ruby 3.0+

Getting started

Install

Add to your Gemfile:

gem "telesink"

Then run:

bundle install

Configuration

Set the environment variable:

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

To disable tracking (e.g. in test/dev):

export TELESINK_DISABLED=true

Usage

Telesink.track(
  event: "user.signed.up",
  text: "user@example.com",
  emoji: "👤",
  properties: {
    user_id: 123,
    email_address: "user@example.com",
  },
  occurred_at: Time.now,     # optional, defaults to now
  idempotency_key: "my-key", # optional, defaults to random UUID
)

Returns

  • true — event sent successfully
  • false — disabled, missing endpoint, or network error

Errors are never raised. They are logged to STDERR and fail silently.

Testing

bundle exec rake test

License

MIT (see LICENSE.md).

Packages

 
 
 

Contributors

Languages