Add class to migration worker and record logs
What does this MR do and why?
Adds class
to structured logging for Elastic::MigrationWorker
and Elastic::MigrationRecord
Screenshots or screen recordings
N/A
How to set up and validate locally
- tail the elasticsearch.log -
tail -f <gdk_dir>/gitlab/log/elasticsearch.log
- run the
migration_worker_spec.rb
-bundle exec rspec ee/spec/workers/elastic/migration_worker_spec.rb
- verify in the log that the
class
field is set for all log entries
example
{"severity":"INFO","time":"2023-03-09T21:25:16.614Z","correlation_id":"c3016c58da3e3c78bc7363850610a303","class":"Elastic::MigrationWorker","message":"MigrationWorker: migration[ApplyMaxAnalyzedOffset] updating with completed: false","job_status":"running","queue":"default","jid":null}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Terri Chu