Treblle for GO lang

Learn how to get started with Treblle using our GO SDK in less than 2 minutes on any new or existing API

Step 1

Install Treblle

Run command

go get github.com/treblle/treblle-go

You can ⭐ our Github repo to stay up to date with new updates

View on Github

Go to Step 2
Step 2

Configure the SDK

Add a few lines of code

import "github.com/treblle/treblle-go"
 
func main() {
treblle.Configure(treblle.Configuration{
APIKey: "YOUR API KEY HERE",
ProjectID: "YOUR PROJECT ID HERE"
}
 
// REST OF YOUR APP
}

HEADS UP: You need to create an account to get your API KEY and PROJECT ID

Go to Step 3
Step 3

Enable Treblle on your API

Use the Treblle middleware

mux := http.NewServeMux()
mux.Handle("/", treblle.Middleware(yourHandler))
Go to Step 4
Done

🎉 You're all set! 🎉

You and your team just got these amazing features:

  • Real-time API monitoring
  • Auto-generated API documenation
  • API analytics
  • Powerfull request search and filtering
  • 1-click API testing
  • Real-time problem detection
  • OpenAPI Specification support
  • Location based request tracking
  • Smart URL parameters detection
  • and many more..
Optional

Configuration params

Mask sensitive data

import "github.com/treblle/treblle-go"
 
func main() {
treblle.Configure(treblle.Configuration{
APIKey: "YOUR API KEY HERE",
ProjectID: "YOUR PROJECT ID HERE",
KeysToMask: []string{"secret", "private", "user_ssn"} // Keys Treblle should mask
}
 
// REST OF YOUR APP
}

PRO TIP: Data is masked before it even leaves your server

Need help getting started with Treblle on your API?

Book a meeting