UpdateHTTPClient updates the http client with the necessary otel transport
(client *http.Client, name string)
| 45 | |
| 46 | // UpdateHTTPClient updates the http client with the necessary otel transport |
| 47 | func 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. |
| 57 | func StartSpan(ctx context.Context, opName string, opts ...SpanOpt) (context.Context, *Span) { |
no outgoing calls
no test coverage detected
searching dependent graphs…