Skip to content

Commit c54278e

Browse files
committed
lint
1 parent ca28b7d commit c54278e

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

aws/logs_monitoring/enhanced_lambda_metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def parse_metrics_from_json_report_log(log_message):
320320
else:
321321
tags.append("cold_start:false")
322322

323-
# Billed duration only available for On-Demand Lambda functions,
323+
# Billed duration only available for On-Demand Lambda functions,
324324
# for Managed Instances, this is no longer available.
325325
billed_duration = record_metrics.get(BILLED_DURATION_RECORD_KEY)
326326
if billed_duration is not None and memory_allocated is not None:

aws/logs_monitoring/tests/test_enhanced_lambda_metrics.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,16 @@ class TestEnhancedLambdaMetrics(unittest.TestCase):
9696
"durationMs": 2.524,
9797
},
9898
"spans": [
99-
{"name": "responseLatency", "start": "2026-01-08T18:22:35.342Z", "durationMs": 0.642},
100-
{"name": "responseDuration", "start": "2026-01-08T18:22:35.343Z", "durationMs": 0.075},
99+
{
100+
"name": "responseLatency",
101+
"start": "2026-01-08T18:22:35.342Z",
102+
"durationMs": 0.642,
103+
},
104+
{
105+
"name": "responseDuration",
106+
"start": "2026-01-08T18:22:35.343Z",
107+
"durationMs": 0.075,
108+
},
101109
],
102110
"status": "success",
103111
},
@@ -148,7 +156,9 @@ def test_parse_metrics_from_timeout_json_report_log(self):
148156

149157
def test_parse_metrics_from_partial_metrics_json_report_log(self):
150158
"""Test that JSON report logs with partial/incomplete metrics don't raise KeyError"""
151-
parsed_metrics = parse_metrics_from_json_report_log(self.managed_instances_metrics_json_report)
159+
parsed_metrics = parse_metrics_from_json_report_log(
160+
self.managed_instances_metrics_json_report
161+
)
152162
# Should only return metrics that are present (duration in this case)
153163
# Should not raise KeyError for missing billedDurationMs, maxMemoryUsedMB, memorySizeMB
154164
assert len(parsed_metrics) == 1 # Only duration metric

0 commit comments

Comments
 (0)