Browse Source

fix(syncing-server): skip sending empty metrics

Karol Sójko 1 year ago
parent
commit
2c732ff713
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/syncing-server/bin/statistics.ts

+ 4 - 0
packages/syncing-server/bin/statistics.ts

@@ -34,6 +34,10 @@ const sendStatistics = async (
         timestamp + Time.MicrosecondsInAMinute,
       )
 
+      if (statistics.sampleCount === 0) {
+        continue
+      }
+
       await cloudwatchClient.send(
         new PutMetricDataCommand({
           Namespace: 'SyncingServer',