We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8318f22 commit b07528bCopy full SHA for b07528b
1 file changed
datadog_lambda/dsm.py
@@ -51,6 +51,7 @@ def _dsm_set_kinesis_context(event):
51
52
def _set_dsm_context_for_record(record, type, arn):
53
from ddtrace.data_streams import set_consume_checkpoint
54
+
55
try:
56
context_json = _get_dsm_context_from_lambda(record)
57
if not context_json:
@@ -94,7 +95,9 @@ def _get_dsm_context_from_lambda(message):
94
95
if "MessageAttributes" in parsed_body:
96
message_body = parsed_body
97
except (ValueError, TypeError):
- logger.debug("Unable to parse lambda message body as JSON, treat as non-json")
98
+ logger.debug(
99
+ "Unable to parse lambda message body as JSON, treat as non-json"
100
+ )
101
102
message_attributes = message_body.get("MessageAttributes") or message_body.get(
103
"messageAttributes"
0 commit comments