Commit 97473df0 authored by Stan Hu's avatar Stan Hu Committed by Sean McGivern

Make Sidekiq exporter logs conform to Sidekiq logs

Sidekiq logs generates `exception.message`, `exception.class`, and
`exception.backtrace`, while the Sidekiq exporter uses the string
`exception` for the listen error. To avoid conflicting schema types in
Elasticsearch, change `exception` to `exception.message`.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/215381
parent 7e9e292c
......@@ -32,7 +32,7 @@ module Gitlab
Sidekiq.logger.error(
class: self.class.to_s,
message: 'Cannot start sidekiq_exporter',
exception: e.message
'exception.message' => e.message
)
false
......
......@@ -53,7 +53,7 @@ describe Gitlab::Metrics::Exporter::SidekiqExporter do
.with(
class: described_class.to_s,
message: 'Cannot start sidekiq_exporter',
exception: anything)
'exception.message' => anything)
exporter.start
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment