Skip to content

Commit 37eb302

Browse files
fix
1 parent f04e912 commit 37eb302

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

datadog_lambda/tracing.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,11 @@ def extract_context_from_kinesis_event(event, lambda_context):
392392
if config.data_streams_enabled:
393393
from ddtrace.data_streams import PROPAGATION_KEY_BASE_64
394394

395-
if PROPAGATION_KEY_BASE_64 in dd_ctx:
396-
data_streams_ctx = {
397-
PROPAGATION_KEY_BASE_64: dd_ctx[PROPAGATION_KEY_BASE_64]
398-
}
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+
}
399400

400401
return propagator.extract(dd_ctx), data_streams_ctx.get
401402
except Exception as e:

0 commit comments

Comments
 (0)