Skip to content

Commit ee4800d

Browse files
committed
Remove explicit otel injection
1 parent 35d4a18 commit ee4800d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

internal/thirdparty/google_token_source/builder.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@ package google_token_source
33
import (
44
"context"
55
"fmt"
6-
"net/http"
76

87
"github.com/davecgh/go-spew/spew"
9-
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
108
"golang.org/x/oauth2"
119
admin_directory "google.golang.org/api/admin/directory/v1"
1210
"google.golang.org/api/impersonate"
13-
"google.golang.org/api/option"
1411
)
1512

1613
type Builder struct {
@@ -44,9 +41,8 @@ func (g Builder) impersonateTokenSource(ctx context.Context, delegate bool, scop
4441

4542
spew.Dump(impersonateConfig)
4643

47-
return impersonate.CredentialsTokenSource(ctx, impersonateConfig, option.WithHTTPClient(
48-
&http.Client{Transport: otelhttp.NewTransport(http.DefaultTransport)},
49-
))
44+
// Otel transport is added by the library
45+
return impersonate.CredentialsTokenSource(ctx, impersonateConfig)
5046
}
5147

5248
func (g Builder) Admin(ctx context.Context) (oauth2.TokenSource, error) {

0 commit comments

Comments
 (0)