Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/treblle/treblle-go-gin
The official Treblle SDK for Go, tailored for the Gin framework. Seamlessly integrate Treblle into your Gin applications to effortlessly manage communication with your dashboard, transmit errors, and safeguard sensitive data.
https://github.com/treblle/treblle-go-gin
api api-monitoring api-observability backend developer-tool gin gin-framework go golang-sdk logging rest-api restful-api sdk treblle treblle-sdk
Last synced: 2 months ago
JSON representation
The official Treblle SDK for Go, tailored for the Gin framework. Seamlessly integrate Treblle into your Gin applications to effortlessly manage communication with your dashboard, transmit errors, and safeguard sensitive data.
- Host: GitHub
- URL: https://github.com/treblle/treblle-go-gin
- Owner: Treblle
- License: mit
- Created: 2022-04-12T15:41:55.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-25T17:17:23.000Z (about 1 year ago)
- Last Synced: 2024-06-20T00:27:04.105Z (7 months ago)
- Topics: api, api-monitoring, api-observability, backend, developer-tool, gin, gin-framework, go, golang-sdk, logging, rest-api, restful-api, sdk, treblle, treblle-sdk
- Language: Go
- Homepage: https://www.treblle.com/
- Size: 8.79 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# treblle-go-gin
The offical Treblle SDK for Go using Gin## Installation
```shell
go get github.com/treblle/treblle-go-gin
```Trebble uses [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependencies.
## Basic configuration
Configure Treblle at the start of your `main()` function:
```go
import "github.com/treblle/treblle-go"func main() {
treblle.Configure(treblle.Configuration{
APIKey: "YOUR API KEY HERE",
ProjectID: "YOUR PROJECT ID HERE",
KeysToMask: []string{"password", "card_number"}, // optional, mask fields you don't want sent to Treblle
ServerURL: "https://rocknrolla.treblle.com", // optional, don't use default server URL
}// rest of your program.
}```
After that, just use the middleware with any of your Gin handlers:
```go
r := gin.Default()
r.Use(treblle.GinMiddleware())
```