diff --git a/plugins/providers/gitlab/provider.go b/plugins/providers/gitlab/provider.go index 42e4b32a..250a2a0b 100644 --- a/plugins/providers/gitlab/provider.go +++ b/plugins/providers/gitlab/provider.go @@ -10,6 +10,7 @@ import ( pv "github.com/goto/guardian/core/provider" "github.com/goto/guardian/domain" "github.com/goto/guardian/pkg/log" + "github.com/goto/guardian/pkg/opentelemetry" "github.com/goto/guardian/utils" "github.com/xanzy/go-gitlab" "golang.org/x/sync/errgroup" @@ -271,7 +272,8 @@ func (p *provider) getClient(pc domain.ProviderConfig) (*gitlab.Client, error) { return nil, fmt.Errorf("unable to decrypt credentials: %w", err) } - client, err := gitlab.NewClient(creds.AccessToken, gitlab.WithBaseURL(creds.Host)) + gitlabHTTPClient := opentelemetry.NewHttpClient("GitlabClient") + client, err := gitlab.NewClient(creds.AccessToken, gitlab.WithBaseURL(creds.Host), gitlab.WithHTTPClient(gitlabHTTPClient)) if err != nil { return nil, fmt.Errorf("unable to create gitlab client: %w", err) }