Skip to content

Commit fda3b8c

Browse files
rename arn extraction function
1 parent 209f68f commit fda3b8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

datadog_lambda/tracing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
def _dsm_set_context_sqs_or_sns_event(event, event_type):
7272
for record in event.get("Records", [])[1:]:
73-
if arn := _dsm_get_source_arn(record, event_type):
73+
if arn := get_source_arn_sqs_or_sns(record, event_type):
7474
context = extract_context_from_sqs_or_sns_record(record)
7575
_dsm_set_checkpoint(context, event_type, arn)
7676

@@ -82,7 +82,7 @@ def _dsm_set_context_kinesis_event(event):
8282
_dsm_set_checkpoint(context, "kinesis", arn)
8383

8484

85-
def _dsm_get_source_arn(record, event_type):
85+
def get_source_arn_sqs_or_sns(record, event_type):
8686
return (
8787
record.get("Sns", {}).get("TopicArn")
8888
if event_type == "sns"
@@ -271,7 +271,7 @@ def extract_context_from_sqs_or_sns_event_or_context(
271271

272272
try:
273273
first_record = event.get("Records")[0]
274-
source_arn = _dsm_get_source_arn(first_record, event_type)
274+
source_arn = get_source_arn_sqs_or_sns(first_record, event_type)
275275
dd_data = extract_context_from_sqs_or_sns_record(first_record)
276276
if dd_data:
277277
if is_step_function_event(dd_data):

0 commit comments

Comments
 (0)