package
0.0.6-dev-release
Repository: https://github.com/inclusi-blog/gola-utils.git
Documentation: pkg.go.dev

# README

Tracing

tools

  1. OpenCensus exporter
  2. OpenCensus collector
  3. Jaeger backend

Steps to add tracing

  1. Initialise a exporter to export traces
import "github.com/inclusi-blog/gola-utils/http/request"

tracing.Init("service-name", "collector-address")
  1. Instrument server
app := tracing.WithTracing(router, "api-healthz-endpoint") // to avoid tracing health endpoint
gohttp.ListenAndServe(":8080", app)
  1. Instrument client for inter service calls
import "go.opencensus.io/plugin/ochttp"
httpClient := &http.Client{Transport: &ochttp.Transport{}}