Remove deprecated tracing function
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
parent
8203bb9977
commit
cf4b57989d
@ -35,19 +35,6 @@ type StartConfig struct {
|
|||||||
|
|
||||||
type SpanOpt func(config *StartConfig)
|
type SpanOpt func(config *StartConfig)
|
||||||
|
|
||||||
// WithHTTPRequest marks span as a HTTP request operation from client to server.
|
|
||||||
// It'll append attributes from the HTTP request object and mark it with `SpanKindClient` type.
|
|
||||||
//
|
|
||||||
// Deprecated: use upstream functionality from otelhttp directly instead. This function is kept for API compatibility
|
|
||||||
// but no longer works as expected due to required functionality no longer exported in OpenTelemetry libraries.
|
|
||||||
func WithHTTPRequest(_ *http.Request) SpanOpt {
|
|
||||||
return func(config *StartConfig) {
|
|
||||||
config.spanOpts = append(config.spanOpts,
|
|
||||||
trace.WithSpanKind(trace.SpanKindClient), // A client making a request to a server
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateHTTPClient updates the http client with the necessary otel transport
|
// UpdateHTTPClient updates the http client with the necessary otel transport
|
||||||
func UpdateHTTPClient(client *http.Client, name string) {
|
func UpdateHTTPClient(client *http.Client, name string) {
|
||||||
client.Transport = otelhttp.NewTransport(
|
client.Transport = otelhttp.NewTransport(
|
||||||
|
Loading…
Reference in New Issue
Block a user