Better tracing during extSvcAcc registration (#84719)

This commit is contained in:
Xavi Lacasa
2024-03-21 16:41:10 +01:00
committed by GitHub
parent b848d8709c
commit a813046f3d
8 changed files with 95 additions and 46 deletions
@@ -41,8 +41,10 @@ func (s *Service) HasExternalService(ctx context.Context, pluginID string) (bool
// RegisterExternalService is a simplified wrapper around SaveExternalService for the plugin use case.
func (s *Service) RegisterExternalService(ctx context.Context, pluginID string, pType pfs.Type, svc *pfs.IAM) (*auth.ExternalService, error) {
ctxLogger := s.log.FromContext(ctx)
if !s.featureEnabled {
s.log.Warn("Skipping External Service Registration. The feature is behind a feature toggle and needs to be enabled.")
ctxLogger.Warn("Skipping External Service Registration. The feature is behind a feature toggle and needs to be enabled.")
return nil, nil
}