Include the relevant details (repository name, user, and code host) in the repo-updater log messages
Created by: mike-r-mclaughlin
Feedback
The repo-updater produced lines like this in the log output:
{ [-]
attrs: { [-]
service: repo-updater
}
log: {"SeverityText":"ERROR","Timestamp":1660206555614840215,"InstrumentationScope":"service.PermsSyncer.runSync","Caller":"authz/perms_syncer.go:1071","Function":"github.com/sourcegraph/sourcegraph/enterprise/cmd/repo-updater/internal/authz.(*PermsSyncer).runSync","Body":"failed to sync permissions","Resource":{"service.name":"repo-updater","service.version":"3.41.0","service.instance.id":"c77c1d902234"},"Attributes":{"request":{"type":2,"id":15},"error":"fetch user permissions via external accounts: fetch user permissions for external account 21: list ACLs by user: unexpected status code: 400 - context deadline exceeded"}}
stream: stderr
time: 2022-08-11T08:29:15.615051228Z
}
From this log (an ERROR
), it's difficult to determine what code host and user this is referring to. It would be great if the log could include those details so the admin can look into this error.
Customer
Reported by https://github.com/sourcegraph/accounts/issues/6716 in Slack thread