Giter VIP home page Giter VIP logo

treblle / treblle-go-gin Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 3.0 9 KB

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.

Home Page: https://www.treblle.com/

License: MIT License

Go 100.00%
api api-monitoring api-observability backend developer-tool gin gin-framework go golang-sdk logging

treblle-go-gin's Introduction

treblle-go-gin

The offical Treblle SDK for Go using Gin

Installation

go get github.com/treblle/treblle-go-gin

Trebble uses Go Modules to manage dependencies.

Basic configuration

Configure Treblle at the start of your main() function:

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:

r := gin.Default()
r.Use(treblle.GinMiddleware())

treblle-go-gin's People

Contributors

cindreta avatar majatrepsic avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

treblle-go-gin's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.