tag sentry reports in jobs with current shard and db

Change-Id: I3fec7ec730dba557a6f96d0c63e518e7ccc69365
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332722
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2023-11-13 11:32:31 -07:00
parent edfe0d9540
commit 1ff461e9df
1 changed files with 3 additions and 1 deletions

View File

@ -139,7 +139,9 @@ Delayed::Worker.lifecycle.around(:perform) do |worker, job, &block|
LiveEvents.set_context(job.live_events_context)
Sentry.set_tags({
jobs_cluster: job.current_shard.delayed_jobs_shard&.id
jobs_cluster: job.current_shard.delayed_jobs_shard&.id,
shard: job.current_shard.id,
db_cluster: job.current_shard.database_server.id
})
HostUrl.reset_cache!