From 509e94f04064d0981f9f0c19a62b750bbc05f2ab Mon Sep 17 00:00:00 2001 From: Adam Mainz Date: Mon, 14 Oct 2024 12:05:42 -0700 Subject: [PATCH] sakipping null values in scribe message Summary: since we have added flexibility for different sets of metrics per operater we want to skip messages for empty metrics Reviewed By: nmacchioni Differential Revision: D64345289 fbshipit-source-id: d5b1fff90c6acd530867d0b6ef3ea97bc6f41cf5 --- scripts/userbenchmark/upload_scribe.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/userbenchmark/upload_scribe.py b/scripts/userbenchmark/upload_scribe.py index 744dea44b1..509768a2eb 100644 --- a/scripts/userbenchmark/upload_scribe.py +++ b/scripts/userbenchmark/upload_scribe.py @@ -27,6 +27,8 @@ def format_message(self, field_dict): assert "time" in field_dict, "Missing required Scribe field 'time'" message = defaultdict(dict) for field, value in field_dict.items(): + if value is None: + continue if field in self.schema["normal"]: message["normal"][field] = str(value) elif field in self.schema["int"]: