We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b5abe4 commit e96b4c1Copy full SHA for e96b4c1
datadog_lambda/metric.py
@@ -65,6 +65,8 @@ def lambda_metric(metric_name, value, timestamp=None, tags=None, force_async=Fal
65
timestamp_ceiling = int(
66
(datetime.now() - timedelta(hours=4)).timestamp()
67
) # 4 hours ago
68
+ if isinstance(timestamp, datetime):
69
+ timestamp = int(timestamp.timestamp())
70
if timestamp_ceiling > timestamp:
71
logger.warning(
72
"Timestamp %s is older than 4 hours, not submitting metric %s",
0 commit comments