From 2fdce2e2ad7e125012c7e6dcbfa02b50f73c128e Mon Sep 17 00:00:00 2001 From: Christian Wahl Date: Sun, 16 Jan 2022 01:32:50 +0100 Subject: [PATCH] Include timestamp in HPFeeds reporter (#411) * Include timestamp in HPFeeds reporter * Update log_hpfeeds.py --- tanner/reporting/log_hpfeeds.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tanner/reporting/log_hpfeeds.py b/tanner/reporting/log_hpfeeds.py index 4bfc1b82..7b9f1663 100644 --- a/tanner/reporting/log_hpfeeds.py +++ b/tanner/reporting/log_hpfeeds.py @@ -1,5 +1,6 @@ import traceback import json +from datetime import datetime import tanner.reporting.hpfeeds as hpfeeds @@ -27,6 +28,7 @@ def connected(self): return self.connected_state def create_session(self, session_data): + session_data["timestamp"] = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S.%f") event_data = json.dumps(session_data) try: self.hpc.publish(self.channel, event_data)