From 812641ee9ca9ae2d6602d0579fbafac617b5362d Mon Sep 17 00:00:00 2001 From: Oskar Date: Fri, 24 Oct 2025 20:09:26 +0800 Subject: [PATCH] chore: change prepareUserAuthMethodTypesQuery log level (#10813) # Which Problems Are Solved During normal operations, when listing authentication method types, activated IDPs are added to the `userAuthMethodTypes` slice but there's an error in the logs, causing false alarms in our alerting system which has been configured to trigger on error-level logs: ``` { "logDate": "2025-09-29T07:47:49.524794306Z", "protocol": 0, "requestUrl": "/zitadel.user.v2.UserService/ListAuthenticationMethodTypes", "responseStatus": 0, "requestHeaders": { "authorization": [ "[REDACTED]" ], "content-type": [ "application/grpc+proto" ], "grpc-accept-encoding": [ "gzip,br" ], "host": [ "zitadel.example.com" ], "te": [ "trailers" ], "user-agent": [ "connect-es/2.0.4" ] }, "responseHeaders": {}, "instanceId": "329151080840616127", "projectId": "329851980840157809", "requestedDomain": "zitadel.example.com", "requestedHost": "zitadel.example.com" } { "caller": "/home/runner/work/zitadel/zitadel/internal/query/user_auth_method.go:478", "level": "error", "msg": "IDP1", "time": "2025-09-29T07:47:49Z" } ``` # How the Problems Are Solved The log was changed to debug level and the log text was updated to better describe what is happening. Another possible solution would be to remove the log line completely. Reviewers can decide if this is a better solution. # Additional Changes None. # Additional Context None. Co-authored-by: Livio Spring --- internal/query/user_auth_method.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/query/user_auth_method.go b/internal/query/user_auth_method.go index b7635e9ff65..803c0908678 100644 --- a/internal/query/user_auth_method.go +++ b/internal/query/user_auth_method.go @@ -475,7 +475,7 @@ func prepareUserAuthMethodTypesQuery(activeOnly bool, includeWithoutDomain bool, userAuthMethodTypes = append(userAuthMethodTypes, domain.UserAuthMethodTypePassword) } if idp.Valid && idp.Int64 > 0 { - logging.Error("IDP", idp.Int64) + logging.Debug("Adding IDP ", idp.Int64, " to userAuthMethodTypes") userAuthMethodTypes = append(userAuthMethodTypes, domain.UserAuthMethodTypeIDP) }