File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -269,11 +269,10 @@ def extract_context_from_sqs_or_sns_event_or_context(event, lambda_context):
269269 if config .data_streams_enabled :
270270 from ddtrace .data_streams import PROPAGATION_KEY_BASE_64
271271
272- data_streams_ctx = (
273- {PROPAGATION_KEY_BASE_64 : dd_data [PROPAGATION_KEY_BASE_64 ]}
274- if PROPAGATION_KEY_BASE_64 in dd_data
275- else {}
276- )
272+ if PROPAGATION_KEY_BASE_64 in dd_data :
273+ data_streams_ctx = {
274+ PROPAGATION_KEY_BASE_64 : dd_data [PROPAGATION_KEY_BASE_64 ]
275+ }
277276
278277 if is_step_function_event (dd_data ):
279278 try :
@@ -392,11 +391,11 @@ def extract_context_from_kinesis_event(event, lambda_context):
392391 if config .data_streams_enabled :
393392 from ddtrace .data_streams import PROPAGATION_KEY_BASE_64
394393
395- data_streams_ctx = (
396- { PROPAGATION_KEY_BASE_64 : dd_ctx [ PROPAGATION_KEY_BASE_64 ]}
397- if PROPAGATION_KEY_BASE_64 in dd_ctx
398- else { }
399- )
394+ if PROPAGATION_KEY_BASE_64 in dd_ctx :
395+ data_streams_ctx = {
396+ PROPAGATION_KEY_BASE_64 : dd_ctx [ PROPAGATION_KEY_BASE_64 ]
397+ }
398+
400399 return propagator .extract (dd_ctx ), data_streams_ctx .get
401400 except Exception as e :
402401 logger .debug ("The trace extractor returned with error %s" , e )
You can’t perform that action at this time.
0 commit comments