Skip to content

Commit 8d6fbfd

Browse files
committed
Apply patch all when ddtrace is enabled
1 parent e9d26ec commit 8d6fbfd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

datadog_lambda/wrapper.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
set_dd_trace_py_root,
2323
create_function_execution_span,
2424
)
25+
from ddtrace import patch_all as patch_all_dd
2526

2627
logger = logging.getLogger(__name__)
2728

@@ -96,6 +97,8 @@ def __init__(self, func):
9697
# When using dd_trace_py it will patch all the http clients for us,
9798
# Patch HTTP clients to propagate Datadog trace context
9899
patch_all()
100+
else:
101+
patch_all_dd()
99102
logger.debug("datadog_lambda_wrapper initialized")
100103
except Exception:
101104
traceback.print_exc()

0 commit comments

Comments
 (0)