Skip to content

Make Sidekiq timestamps consistently ISO 8601

Stan Hu requested to merge sh-fix-sidekiq-timestamps into master

Previously when an exception occurred in Sidekiq, Sidekiq would export logs with timestamps (e.g. created_at, enqueued_at) in floating point seconds, while other jobs would report in ISO 8601 format. This inconsistency in data types would cause Elasticsearch to drop logs that did not match the schema type (date in most cases).

This commit moves the responsibility of formatting timestamps to the Sidekiq JSON formatter where it properly belongs. The job logger now generates timestamps with floats, just as Sidekiq does. This ensures that timestamps are manipulated only in one place.

See https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/8269

Closes #194116 (closed)

Edited by Dylan Griffith

Merge request reports