Inconsistent date format in sidekiq worker logs
Time fields in sidekiq worker logs have inconsistent date formats. They are either logged as a unix timestamp float value or a datetime string. This seems to be happening since 12/30 at least and is causing alerts because elastic search can't index those logs (https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/8833).
Affected fields: failed_at
, retried_at
, created_at
, enqueued_at
and probably other ..._at
fields.
E.g. PagesDomainSslRenewalWorker
on best_effort
nodes is logging failed_at
either as floating point value (on "job_status":"done"
logs) or as date string (on "job_status":"start"
logs).
Examples:
...,"retried_at":1577964097.5339305,"pid":5560,"message":"ReactiveCachingWorker JID-b89c90d81496e453ccbd1d40: start","job_status":"start",...
...,"retried_at":"2020-01-02T11:21:37.533Z","pid":5560,"message":"ReactiveCachingWorker JID-b89c90d81496e453ccbd1d40: fail: 4.183228 sec","job_status":"fail"
Edited by Henri Philipps