Skip to content

Commit ed0b485

Browse files
Removing unnecessary allocations from header extraction
1 parent 4954749 commit ed0b485

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

datadog_lambda/tracing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,10 @@ def extract_context_from_request_header(event, lambda_context):
542542
Attempt to extract Datadog trace context from an event payload where Datadog information
543543
is under the event["request"]["header"] section. Intended to replace some of the
544544
need for customers to provide custom extractor functions in their code for workflows such as
545-
RUM -> AppSync -> Datadog.
545+
RUM -> AppSync -> Lambda.
546546
"""
547547
try:
548-
nested_json = event.get("request", {}).get("headers", {})
548+
nested_json = event.get("request").get("headers")
549549
context = propagator.extract(nested_json)
550550

551551
if not _is_context_complete(context):

0 commit comments

Comments
 (0)