File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
instrumentation/net/http/otelhttp Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
3232- ` WithRouteTag ` in ` go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp ` is deprecated.
3333 The route is already added automatically for spans.
3434 For metrics, the alternative is to use the ` WithMetricAttributesFn ` option. (#8117 )
35+ - ` DefaultClient ` in ` go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp ` is deprecated.
36+ Use a custom ` *http.Client ` with ` otelhttp.NewTransport(http.DefaultTransport) ` instead. (#8140 )
3537
3638### Removed
3739
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ import (
1414// DefaultClient is the default Client and is used by Get, Head, Post and PostForm.
1515// Please be careful of initialization order - for example, if you change
1616// the global propagator, the DefaultClient might still be using the old one.
17+ //
18+ // Deprecated: [DefaultClient] will be removed in a future release.
19+ // Create your own *http.Client with Transport = otelhttp.NewTransport(http.DefaultTransport)
20+ // instead of relying on this global variable.
1721var DefaultClient = & http.Client {Transport : NewTransport (http .DefaultTransport )}
1822
1923// Get is a convenient replacement for http.Get that adds a span around the request.
You can’t perform that action at this time.
0 commit comments