Git Product home page Git Product logo

sample-golang-app's Introduction

Bookstore REST API using Gin and Gorm

Read this article on understand how to build a sample golang app using Gin and Gorm.

To run and configure app to send data to SigNoz:

SERVICE_NAME=goApp INSECURE_MODE=true OTEL_EXPORTER_OTLP_ENDPOINT=<IP of SigNoz backend>:4317 go run main.go

should be without http/https scheme. Eg localhost:4317

This runs the gin application at port 8090. Try accessing API at http://localhost:8090/books

Below are the apis available to play around. The API calls will generate telemetry data which will be sent to SigNoz which can be viewed at <IP of SigNoz backend>:3000

GET    /books                    
GET    /books/:id               
POST   /books                    
PATCH  /books/:id                
DELETE /books/:id                

Instrumentation Packages

The OpenTelemetry registry is the best place to discover instrumentation packages. It will include packages outside of this project.

The following instrumentation packages are provided for popular Go packages and use-cases.

Instrumentation Package Metrics Traces
github.com/astaxie/beego
github.com/aws/aws-sdk-go-v2
github.com/bradfitz/gomemcache
github.com/emicklei/go-restful
github.com/gin-gonic/gin
github.com/go-kit/kit
github.com/gocql/gocql
github.com/gorilla/mux
github.com/labstack/echo
github.com/Shopify/sarama
go.mongodb.org/mongo-driver
google.golang.org/grpc
gopkg.in/macaron.v1
host
net/http
net/http/httptrace
runtime

Follow Opentelemetry docs for examples on latest otel releases: Opentelemetry-go

sample-golang-app's People

Contributors

ankitnayan avatar makeavish avatar

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.