mailgun / holster

A place to keep useful golang functions and small libraries
Apache License 2.0
289 stars 35 forks source link

PIP-2262: HTTP tracing #159

Closed Baliedge closed 1 year ago

Baliedge commented 1 year ago

https://mailgun.atlassian.net/browse/PIP-2262

Add functionality for instrumenting HTTP requests for use in HTTP service client library.

client := tracing.NewHTTPClient()

tracing.NewHTTPClient creates an http.Client configured with OpenTelemetry middleware to generate a span on a request and propagate the trace to the server.