Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/identity_job_log_subscriber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def enqueue(event)
json = default_attributes(event, job)

if ex
json[:exception_class] = ex.class
json[:exception_class] = ex.class.name
json[:exception_message] = ex.message

error(json.to_json)
Expand All @@ -29,7 +29,7 @@ def enqueue_at(event)
json = default_attributes(event, job)

if ex
json[:exception_class] = ex.class
json[:exception_class] = ex.class.name
json[:exception_message] = ex.message

error(json.to_json)
Expand Down Expand Up @@ -65,7 +65,7 @@ def perform(event)

if ex
# NewRelic?
json[:exception_class] = ex.class
json[:exception_class] = ex.class.name
json[:exception_message] = ex.message
json[:exception_backtrace] = Array(ex.backtrace).join("\n")

Expand All @@ -88,7 +88,7 @@ def enqueue_retry(event)
wait_ms: wait.to_i.in_milliseconds,
}

json[:exception_class] = ex.class if ex
json[:exception_class] = ex.class.name if ex

info(json.to_json)
end
Expand All @@ -98,7 +98,7 @@ def retry_stopped(event)
ex = event.payload[:error]

json = default_attributes(event, job).merge(
exception_class: ex.class,
exception_class: ex.class.name,
attempts: job.executions,
)

Expand Down
1 change: 1 addition & 0 deletions spec/lib/identity_job_log_subscriber_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
expect(json.key?('duration_ms'))
expect(json.key?('job_id'))
expect(json.key?('timestamp'))
expect(json['exception_class']).to eq('ArgumentError')
expect(json['exception_message']).to eq 'invalid base64'
end

Expand Down