Categorygithub.com/sebnow/httptracing
modulepackage
1.0.0
Repository: https://github.com/sebnow/httptracing.git
Documentation: pkg.go.dev

# README

Build Status GoDoc Coverage Status Go Report Card

Description

The httptracing package forms a bridge between httpclient and the opentracing-contrib nethttp package. It provides a HTTP client with opentracing support, implementing the httpclient.Client interface.

Usage

tracer := opentracing.GlobalTracer()
client := httptracing.Trace(tracer, http.DefaultClient)

resp, err := client.Get("http://test.com")
//...

# Functions

Trace wraps the client with a tracer so each request has its own span.

# Structs

TracingClient wraps a http.Client with an OpenTracing tracer.