Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c5d52ecc
Commit
c5d52ecc
authored
Nov 12, 2021
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert Sidekiq scheduled_at to a timestamp field
This makes it consistent with other timestamp fields that we log
parent
29472ba1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
lib/gitlab/sidekiq_logging/json_formatter.rb
lib/gitlab/sidekiq_logging/json_formatter.rb
+1
-1
spec/lib/gitlab/sidekiq_logging/json_formatter_spec.rb
spec/lib/gitlab/sidekiq_logging/json_formatter_spec.rb
+2
-0
No files found.
lib/gitlab/sidekiq_logging/json_formatter.rb
View file @
c5d52ecc
...
...
@@ -6,7 +6,7 @@ require 'json'
module
Gitlab
module
SidekiqLogging
class
JSONFormatter
TIMESTAMP_FIELDS
=
%w[created_at enqueued_at started_at retried_at failed_at completed_at]
.
freeze
TIMESTAMP_FIELDS
=
%w[created_at
scheduled_at
enqueued_at started_at retried_at failed_at completed_at]
.
freeze
def
call
(
severity
,
timestamp
,
progname
,
data
)
output
=
{
...
...
spec/lib/gitlab/sidekiq_logging/json_formatter_spec.rb
View file @
c5d52ecc
...
...
@@ -17,6 +17,7 @@ RSpec.describe Gitlab::SidekiqLogging::JSONFormatter do
'class'
=>
'PostReceive'
,
'bar'
=>
'test'
,
'created_at'
=>
timestamp
,
'scheduled_at'
=>
timestamp
,
'enqueued_at'
=>
timestamp
,
'started_at'
=>
timestamp
,
'retried_at'
=>
timestamp
,
...
...
@@ -31,6 +32,7 @@ RSpec.describe Gitlab::SidekiqLogging::JSONFormatter do
'severity'
=>
'INFO'
,
'time'
=>
timestamp_iso8601
,
'created_at'
=>
timestamp_iso8601
,
'scheduled_at'
=>
timestamp_iso8601
,
'enqueued_at'
=>
timestamp_iso8601
,
'started_at'
=>
timestamp_iso8601
,
'retried_at'
=>
timestamp_iso8601
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment