Skip to content

Commit a6e85c7

Browse files
committed
tracing: enable OTEL on authprovider requests
Signed-off-by: Tonis Tiigi <[email protected]>
1 parent 4b4a9aa commit a6e85c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

session/auth/authprovider/authprovider.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"github.com/moby/buildkit/session"
2525
"github.com/moby/buildkit/session/auth"
2626
"github.com/moby/buildkit/util/progress/progresswriter"
27+
"github.com/moby/buildkit/util/tracing"
2728
"github.com/pkg/errors"
2829
"golang.org/x/crypto/nacl/sign"
2930
"google.golang.org/grpc"
@@ -96,11 +97,11 @@ func (ap *authProvider) FetchToken(ctx context.Context, req *auth.FetchTokenRequ
9697
Secret: creds.Secret,
9798
}
9899

99-
httpClient := http.DefaultClient()
100+
httpClient := tracing.DefaultClient
100101
if tc, err := ap.tlsConfig(req.Host); err == nil && tc != nil {
101102
transport := http.DefaultTransport()
102103
transport.TLSClientConfig = tc
103-
httpClient.Transport = transport
104+
httpClient.Transport = tracing.NewTransport(transport)
104105
}
105106

106107
if creds.Secret != "" {

0 commit comments

Comments
 (0)