MCPcopy
hub / github.com/containerd/containerd / UpdateHTTPClient

Function UpdateHTTPClient

pkg/tracing/tracing.go:47–54  ·  view source on GitHub ↗

UpdateHTTPClient updates the http client with the necessary otel transport

(client *http.Client, name string)

Source from the content-addressed store, hash-verified

45
46// UpdateHTTPClient updates the http client with the necessary otel transport
47func UpdateHTTPClient(client *http.Client, name string) {
48 client.Transport = otelhttp.NewTransport(
49 client.Transport,
50 otelhttp.WithSpanNameFormatter(func(operation string, r *http.Request) string {
51 return name
52 }),
53 )
54}
55
56// StartSpan starts child span in a context.
57func StartSpan(ctx context.Context, opName string, opts ...SpanOpt) (context.Context, *Span) {

Callers 3

doMethod · 0.92
FetchTokenWithOAuthFunction · 0.92
FetchTokenFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…