Telesink Go SDK

Kyrylo Silin
Kyrylo Silin
Telesink founder

Telesink is built in Ruby on Rails, but events come from all kinds of apps. Ruby came first, followed by JavaScript, PHP, and now the official Telesink Go SDK is here.

The github.com/telesink/telesink-go package works for microservices, CLI tools, APIs, background workers, and anything else written in Go.

It uses only the Go standard library. One go get, one environment variable, and you can send an event.

Installation

Run:

go get github.com/telesink/telesink-go

Configuration

The SDK is configured entirely through environment variables. No structs to instantiate, no config files, no YAML.

Set your sink endpoint:

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

For self-hosted Telesink 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

package main

import (
	"github.com/telesink/telesink-go"
)

func main() {
	telesink.Track(telesink.Event{
		Event:      "User signed up",
		Text:       "[email protected]",
		Emoji:      "👤",
		Properties: map[string]any{
			"plan":    "pro",
			"source":  "landing_page",
			"user_id": 123,
			"email":   "[email protected]",
		},
		// OccurredAt and IdempotencyKey are optional (auto-filled)
	})
}

The function returns true if the event was sent successfully and false otherwise (disabled, missing endpoint, network error, or non-2xx response). It will never panic. Errors are logged to stderr, and the call fails quietly.

What’s under the hood

The package is small and uses only the standard library. It:

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

Next steps

Ruby, JavaScript, PHP, and Go are done. The official Python SDK is next. Let me know on X which one you want first.

Other official Telesink SDKs

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

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

Follow along on X at @kyrylo.