distribution: Pass Traceparent OTEL header#49156
Conversation
| // TODO(dmcgowan): Call close idle connections when complete and use keep alive | ||
| DisableKeepAlives: true, | ||
| } | ||
| return otelhttp.NewTransport( |
There was a problem hiding this comment.
I saw there's also a utility for this, not sure if that's better? (possibly it allows not having to import otelhttp, but leave that to to the utility);
moby/vendor/github.com/containerd/containerd/tracing/tracing.go
Lines 51 to 59 in ad69293
There was a problem hiding this comment.
There is, but it takes an returns the whole http.Client instead of a http.RoundTripper so can't really use it
545b92b to
ed39c51
Compare
Wrap `http.RoundTripper` used by distribution code (push/pull) with the `otelhttp.Transport`. Signed-off-by: Paweł Gronowski <[email protected]>
ed39c51 to
93e9f7f
Compare
thaJeztah
left a comment
There was a problem hiding this comment.
SGTM to align with the containerd implementation (which already passes through these headers).
Perhaps would be good to include this in a draft / test-PR in docker/cli to see if the new imports have any unwanted ripple effect w.r.t. dependencies.
Wrap
http.RoundTripperused by distribution code (push/pull) with theotelhttp.Transport.- How to verify it
OTEL_EXPORTER_OTLP_ENDPOINTenv-var)mitmdump -p 5050 -m reverse:<actual registry mirror> --flow-detail 2docker pull <proxy>/<something>Example:
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)