Go gRPC Clean architecture microservice with Prometheus, Grafana monitoring and Jaeger opentracing ⚡️

This page summarizes the projects mentioned and recommended in the original post on dev.to

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • Go-GRPC-Auth-Microservice

    Go GRPC Auth Microservice

    Let's try to create closer to real world gRPC microservice with tracing and monitoring 👋: Source code u can find here Core tools used what will be used: 🚀 PostgreSQL as database Redis for sessions and caching Jaeger open source, end-to-end distributed tracing Prometheus monitoring and alerting Grafana for to compose observability dashboards with everything from Prometheus

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • validator

    :100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving

    Then we usually have to validate request input, for errors gRPC has packages status and codes I found good practice to parse and log errors in handler layer, here i use ParseGRPCErrStatusCode method, which parse err and returns matched gRPC code. Validator is good solution for validation.

  • gomock

    Discontinued GoMock is a mocking framework for the Go programming language. (by golang)

    Every app must be covered by tests, I didn't completely cover all code this one, but wrote some test of course. For testing and mocking testify and gomock is very good tools.

  • redigo

    Go client for Redis

    Setup postgres and redis Usually production SQL db standard solution for these days is combination of sqlx and pgx. Good Redis Go clients is go-redis and redigo, i used first.

  • go-grpc-middleware

    Golang gRPC Middlewares: interceptor chaining, auth, logging, retries and more.

    I found this is very good gRPC Middleware repository, but we easy can create our own, for example logger interceptor:

  • evans

    Evans: more expressive universal gRPC client

    I like to use evans for simple testing gRPC.

  • viper

    Go configuration with fangs

    In cmd folder let's init all dependencies and start the app. Viper is very good and common choice as complete configuration solution for Go applications. We use here config-local.yml file approach.

  • zap

    Blazing fast, structured, leveled logging in Go.

    Next let's create logger, here i used Uber's Zap under the hood, important here is to create Logger interface for be able to replace logger in the future if it's need.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Just released a maintained github.com/davecgh/go-spew/spew fork

    4 projects | /r/golang | 1 Feb 2022
  • logrus.errorf() causes panics?

    3 projects | /r/golang | 5 Feb 2021
  • Quickly and easily implement a high-performance e-commerce system by sponge+dtm

    4 projects | dev.to | 9 Oct 2024
  • Building a RESTful API with Go Fiber: An Express-Inspired Boilerplate

    13 projects | dev.to | 5 Oct 2024
  • Leverage Your Test Suite With testcontainers-go & docker-compose

    4 projects | dev.to | 4 Oct 2024