Skip to content

Commit

Permalink
go: improve http observability
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Login <batazor@evrone.com>
  • Loading branch information
batazor committed Apr 8, 2023
1 parent df83d27 commit 0b25874
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/http/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import (
"net/http"

"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
"go.opentelemetry.io/otel"
)

func New() *http.Client {
return &http.Client{
Transport: otelhttp.NewTransport(http.DefaultTransport),
Transport: otelhttp.NewTransport(
http.DefaultTransport,
otelhttp.WithPropagators(otel.GetTextMapPropagator()),
),
}
}

0 comments on commit 0b25874

Please sign in to comment.