From bc8c177966a6088a27ac459f18006143eece7417 Mon Sep 17 00:00:00 2001 From: Molly Struve Date: Mon, 6 Jan 2020 15:52:47 -0500 Subject: [PATCH] Record db table sizes in datadog where we can use them to generate relevant alerts (#5377) --- lib/tasks/fetch.rake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tasks/fetch.rake b/lib/tasks/fetch.rake index d60ebd4a6..dbb5e2d23 100644 --- a/lib/tasks/fetch.rake +++ b/lib/tasks/fetch.rake @@ -123,5 +123,8 @@ task record_db_table_counts: :environment do table_size: estimate, } ) + DataDogStatsClient.gauge( + "postgres.db_table_size", estimate, tags: { table_name: table_name } + ) end end