Skip to content

Commit 8008aa5

Browse files
authored
Merge branch 'main' into avara1986/APPSEC-56946_cmdi_secure_mark_check
2 parents 86b22a8 + 612d802 commit 8008aa5

File tree

2 files changed

+17
-26
lines changed

2 files changed

+17
-26
lines changed

docs/configuration.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Traces
269269

270270
DD_TRACE_PROPAGATION_STYLE:
271271
default: |
272-
``datadog,tracecontext``
272+
``datadog,tracecontext,baggage``
273273

274274
description: |
275275
Comma separated list of propagation styles used for extracting trace context from inbound request headers and injecting trace context into outbound request headers.
@@ -278,7 +278,7 @@ Traces
278278

279279
Overridden by ``DD_TRACE_PROPAGATION_STYLE_INJECT`` for injection.
280280

281-
The supported values are ``datadog``, ``b3multi``, ``tracecontext``, and ``none``.
281+
The supported values are ``datadog``, ``b3multi``, ``tracecontext``, ``baggage``, and ``none``.
282282

283283
When checking inbound request headers we will take the first valid trace context in the order provided.
284284
When ``none`` is the only propagator listed, propagation is disabled.
@@ -293,6 +293,7 @@ Traces
293293
v1.7.0: The ``b3multi`` propagation style was added and ``b3`` was deprecated in favor it.
294294
v1.7.0: Added support for ``tracecontext`` W3C headers. Changed the default value to ``DD_TRACE_PROPAGATION_STYLE="tracecontext,datadog"``.
295295
v2.6.0: Updated default value to ``datadog,tracecontext``.
296+
v2.16.0: Updated default value to ``datadog,tracecontex,baggage``.
296297

297298
DD_TRACE_SPAN_TRACEBACK_MAX_SIZE:
298299
type: Integer

tests/contrib/aws_lambda/test_aws_lambda.py

+14-24
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import contextlib
2+
13
import pytest
24

35
from ddtrace.contrib.internal.aws_lambda.patch import patch
@@ -11,7 +13,6 @@
1113
from tests.contrib.aws_lambda.handlers import manually_wrapped_handler
1214
from tests.contrib.aws_lambda.handlers import static_handler
1315
from tests.contrib.aws_lambda.handlers import timeout_handler
14-
from tests.utils import flaky
1516
from tests.utils import override_env
1617

1718

@@ -46,13 +47,15 @@ def get_env(env=None):
4647
return {**common_env, **env}
4748

4849

49-
@pytest.fixture(autouse=True)
50-
def setup():
51-
yield
52-
unpatch()
50+
@contextlib.contextmanager
51+
def override_env_and_patch(env):
52+
# patching and unpatching must be done while the environment is set
53+
with override_env(env):
54+
patch()
55+
yield
56+
unpatch()
5357

5458

55-
@flaky(1744053478)
5659
@pytest.mark.parametrize("customApmFlushDeadline", [("-100"), ("10"), ("100"), ("200")])
5760
@pytest.mark.snapshot
5861
def test_timeout_traces(context, customApmFlushDeadline):
@@ -64,9 +67,7 @@ def test_timeout_traces(context, customApmFlushDeadline):
6467
}
6568
)
6669

67-
with override_env(env):
68-
patch()
69-
70+
with override_env_and_patch(env):
7071
datadog(timeout_handler)({}, context())
7172

7273

@@ -83,9 +84,7 @@ def test_continue_on_early_trace_ending(context):
8384
}
8485
)
8586

86-
with override_env(env):
87-
patch()
88-
87+
with override_env_and_patch(env):
8988
datadog(finishing_spans_early_handler)({}, context())
9089

9190

@@ -98,11 +97,8 @@ async def test_file_patching(context):
9897
}
9998
)
10099

101-
with override_env(env):
102-
patch()
103-
100+
with override_env_and_patch(env):
104101
result = datadog(handler)({}, context())
105-
106102
assert result == {"success": True}
107103

108104

@@ -117,11 +113,8 @@ async def test_module_patching(mocker, context):
117113
}
118114
)
119115

120-
with override_env(env):
121-
patch()
122-
116+
with override_env_and_patch(env):
123117
result = manually_wrapped_handler({}, context())
124-
125118
assert result == {"success": True}
126119

127120

@@ -135,7 +128,6 @@ async def test_module_patching(mocker, context):
135128
],
136129
)
137130
@pytest.mark.snapshot
138-
@flaky(1744053478, reason="Did not receive expected traces: 'aws.lambda' for [handler3-instance_handler_with_code]")
139131
def test_class_based_handlers(context, handler, function_name):
140132
env = get_env(
141133
{
@@ -144,8 +136,6 @@ def test_class_based_handlers(context, handler, function_name):
144136
}
145137
)
146138

147-
with override_env(env):
148-
patch()
149-
139+
with override_env_and_patch(env):
150140
result = datadog(handler)({}, context())
151141
assert result == {"success": True}

0 commit comments

Comments
 (0)