Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- `WithRouteTag` in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` is deprecated.
The route is already added automatically for spans.
For metrics, the alternative is to use the `WithMetricAttributesFn` option. (#8117)
- `DefaultClient` in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` is deprecated.
Use a custom `*http.Client` with `otelhttp.NewTransport(http.DefaultTransport)` instead. (#8140)

### Removed

Expand Down
4 changes: 4 additions & 0 deletions instrumentation/net/http/otelhttp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import (
// DefaultClient is the default Client and is used by Get, Head, Post and PostForm.
// Please be careful of initialization order - for example, if you change
// the global propagator, the DefaultClient might still be using the old one.
//
// Deprecated: [DefaultClient] will be removed in a future release.
// Create your own *http.Client with Transport = otelhttp.NewTransport(http.DefaultTransport)
// instead of relying on this global variable.
var DefaultClient = &http.Client{Transport: NewTransport(http.DefaultTransport)}

// Get is a convenient replacement for http.Get that adds a span around the request.
Expand Down
Loading