Open mike-r-mclaughlin opened 1 year ago
Requested by: https://github.com/sourcegraph/accounts/issues/6716 via Slack
Ensure the timestamp in the logs is consistent across all services. Proper ISO format is preferred as it's easy to read and parse.
Examples of log formats in use:
worker formats:
worker
{ "log": "t=2022-12-07T07:46:12+0000 lvl=eror msg=\"error fetching commits from gitserver repo_id: 1: filtering commits: checking sub-repo permissions: request is unauthenticated\"\n", "stream": "stderr", "attrs": { "service": "worker" }, "time": "2022-12-07T07:46:12.541598508Z" }
and also:
{ "log": { "SeverityText": "ERROR", "Timestamp": 1670443658733017775, "InstrumentationScope": "worker.insights-job.background.CommitIndexer.GetCommits", "Caller": "compression/worker.go: 242", "Function": ... }
repo-updater formats
repo-updater
{ "SeverityText": "ERROR", "Timestamp": 1670449088188811191, "InstrumentationScope": "service.PermsSyncer.runSync", "Caller": "authz/perms_syncer.go:1099", "Function": "github.com/sourcegraph/sourcegraph/enterprise/cmd/repo-updater/internal/authz.(*PermsSyncer).syncPerms.func3", "Body": "failed to sync permissions",
This appears to be due to us using multiple log libraries in the product. Transition to the standardized log library is tracked here.
Requested by: https://github.com/sourcegraph/accounts/issues/6716 via Slack
Feature request description
Ensure the timestamp in the logs is consistent across all services. Proper ISO format is preferred as it's easy to read and parse.
Is your feature request related to a problem? If so, please describe.
Examples of log formats in use:
worker
formats:and also:
repo-updater
formats