Go SDK

Instrument Go APIs.

Use native Gin or Fiber middleware, or build a custom adapter on the concurrent shared Go client.

Go 1.23+Packages v0.1.0Production ready
01

Recommended

Use your framework middleware.

Both adapters retain the resolved route template, final status, duration, API version and explicit customer context without reading request or response bodies.

02

Language foundation

Build on one event contract.

apirelio-go owns event creation, route normalization, privacy filtering, bounded retry, backpressure and graceful shutdown.

Terminalbash
go get github.com/pryznar/apirelio-go@v0.1.0
Custom adaptergo
client := apirelio.New(apirelio.Config{
    APIKey:      os.Getenv("APIRELIO_API_KEY"),
    Service:     "billing-api",
    Environment: apirelio.EnvironmentProduction,
    Release:     os.Getenv("APP_RELEASE"),
})

client.Capture(apirelio.CaptureContext{
    Method:   "POST",
    Route:    "/api/invoices/{invoice}/send",
    Status:   202,
    Duration: 84 * time.Millisecond,
    Customer: &apirelio.Customer{ID: "cus_123", Plan: "growth"},
    SDK:      "custom-go",
})
Prefer an adapter

Gin and Fiber applications should install their dedicated package instead of wrapping each request manually.

03

Outside the request path

Concurrent, bounded and fail-safe.

Capture normalizes and queues an event. A background goroutine owns batch delivery, transient retries and timeout handling. The client is safe for concurrent use.

Q

Bounded queue

Overload drops telemetry instead of consuming unbounded application memory.

R

Selective retry

Network failures, rate limits and server errors retry; invalid requests fail fast.

S

Graceful shutdown

A caller-provided context controls the final flush deadline.

04

Compatibility

Supported Go matrix.

ModuleFrameworkRuntime
apirelio-goCustom adaptersGo 1.23+
apirelio-ginGin 1.12Go 1.25+
apirelio-fiberFiber v2Go 1.23+