Skip to content

Commit d4093e7

Browse files
fixes
1 parent 3f482eb commit d4093e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

datadog_lambda/dsm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ def _dsm_set_sns_context(event):
6868
if not sns_data:
6969
return ""
7070
arn = sns_data.get("TopicArn", "")
71-
# Trace data needed for sns payload size calculation
71+
context_json = _get_dsm_context_from_lambda(record)
7272
trace_data = base64.b64encode(
73-
json.dumps(_get_dsm_context_from_lambda(record)).encode("utf-8")
73+
json.dumps(context_json).encode("utf-8")
7474
).decode("utf-8")
7575
payload_size = calculate_sns_payload_size(record, trace_data)
76-
_dsm_set_context_helper(record, "sns", arn, payload_size)
76+
_dsm_set_context_helper("sns", arn, payload_size, context_json)
7777
except Exception as e:
7878
logger.error(format_err_with_traceback(e))
7979

0 commit comments

Comments
 (0)