Skip to content

Commit f79ce6f

Browse files
emmettbutlermabdinursmolavitor-de-araujoYun-Kim
authored
update 3.8 from main for 3.8.0rc2 (#13453)
This change synchronizes the 3.8 branch with the main branch for the purpose of making a new release candidate. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) --------- Co-authored-by: Munir Abdinur <[email protected]> Co-authored-by: Santiago M. Mola <[email protected]> Co-authored-by: Vítor De Araújo <[email protected]> Co-authored-by: Yun Kim <[email protected]> Co-authored-by: Brett Langdon <[email protected]> Co-authored-by: kyle <[email protected]> Co-authored-by: Federico Mon <[email protected]>
1 parent a451470 commit f79ce6f

File tree

31 files changed

+466
-383
lines changed

31 files changed

+466
-383
lines changed

.gitlab/benchmarks/microbenchmarks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ microbenchmarks:
163163
- "packages_update_imported_dependencies"
164164
- "telemetry_add_metric"
165165
- "startup"
166-
- "ddtrace_run"
167166

168167
"microbenchmarks flaky":
169168
extends: .benchmarks

.riot/requirements/142556c.txt renamed to .riot/requirements/1f5205e.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@
22
# This file is autogenerated by pip-compile with Python 3.9
33
# by the following command:
44
#
5-
# pip-compile --no-annotate .riot/requirements/142556c.in
5+
# pip-compile --no-annotate .riot/requirements/1f5205e.in
66
#
7-
atomicwrites==1.4.1
8-
attrs==24.2.0
7+
attrs==25.3.0
98
blinker==1.9.0
10-
click==8.1.7
11-
coverage[toml]==7.6.7
12-
exceptiongroup==1.2.2
9+
click==8.1.8
10+
coverage[toml]==7.8.0
11+
exceptiongroup==1.3.0
1312
flask==0.12.5
1413
flask-cache==0.13.1
1514
hypothesis==6.45.0
16-
importlib-metadata==8.5.0
15+
importlib-metadata==8.7.0
16+
iniconfig==2.1.0
1717
itsdangerous==1.1.0
1818
jinja2==2.10.3
1919
markupsafe==1.1.1
20-
mock==5.1.0
20+
mock==5.2.0
2121
more-itertools==8.10.0
2222
opentracing==2.4.0
23-
packaging==24.2
24-
pluggy==0.13.1
23+
packaging==25.0
24+
pluggy==1.6.0
2525
py==1.11.0
26-
pytest==4.6.11
26+
pytest==6.2.5
2727
pytest-cov==3.0.0
2828
pytest-mock==2.0.0
2929
pytest-randomly==3.16.0
3030
python-memcached==1.62
3131
redis==2.10.6
32-
six==1.16.0
3332
sortedcontainers==2.4.0
34-
tomli==2.1.0
35-
wcwidth==0.2.13
33+
toml==0.10.2
34+
tomli==2.2.1
35+
typing-extensions==4.13.2
3636
werkzeug==0.16.1
3737
zipp==3.21.0

.riot/requirements/af02264.txt renamed to .riot/requirements/f903257.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@
22
# This file is autogenerated by pip-compile with Python 3.8
33
# by the following command:
44
#
5-
# pip-compile --no-annotate .riot/requirements/af02264.in
5+
# pip-compile --no-annotate .riot/requirements/f903257.in
66
#
7-
atomicwrites==1.4.1
8-
attrs==24.2.0
7+
attrs==25.3.0
98
blinker==1.8.2
10-
click==8.1.7
9+
click==8.1.8
1110
coverage[toml]==7.6.1
12-
exceptiongroup==1.2.2
11+
exceptiongroup==1.3.0
1312
flask==0.12.5
1413
flask-cache==0.13.1
1514
hypothesis==6.45.0
1615
importlib-metadata==8.5.0
16+
iniconfig==2.1.0
1717
itsdangerous==1.1.0
1818
jinja2==2.10.3
1919
markupsafe==1.1.1
20-
mock==5.1.0
20+
mock==5.2.0
2121
more-itertools==8.10.0
2222
opentracing==2.4.0
23-
packaging==24.2
24-
pluggy==0.13.1
23+
packaging==25.0
24+
pluggy==1.5.0
2525
py==1.11.0
26-
pytest==4.6.11
26+
pytest==6.2.5
2727
pytest-cov==3.0.0
2828
pytest-mock==2.0.0
2929
pytest-randomly==3.15.0
3030
python-memcached==1.62
3131
redis==2.10.6
32-
six==1.16.0
3332
sortedcontainers==2.4.0
34-
tomli==2.1.0
35-
wcwidth==0.2.13
33+
toml==0.10.2
34+
tomli==2.2.1
35+
typing-extensions==4.13.2
3636
werkzeug==0.16.1
3737
zipp==3.20.2

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
Changelogs for versions not listed here can be found at https://github.com/DataDog/dd-trace-py/releases
44

5+
---
6+
7+
## 3.7.1
8+
9+
10+
### Bug Fixes
11+
12+
- CI Visibility
13+
- Resolves an issue where pytest-xdist would not exit with the proper status code if ATR was enabled.
14+
- Resolves an issue where ddtrace pytest plugin used with xdist would report test suites as failing even when all tests pass.
15+
16+
517
---
618

719
## 2.21.8

benchmarks/ddtrace_run/config.yaml

Lines changed: 0 additions & 46 deletions
This file was deleted.

benchmarks/ddtrace_run/scenario.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

benchmarks/startup/config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
baseline: &defaults
22
env: {}
3+
ddtrace_run: false
4+
send_span: false
35
import_ddtrace: false
46
import_ddtrace_auto: false
57
import_flask: false
@@ -32,3 +34,29 @@ import_ddtrace_auto_django:
3234
<<: *defaults
3335
import_ddtrace_auto: true
3436
import_django: true
37+
ddtrace_run:
38+
<<: *defaults
39+
ddtrace_run: true
40+
ddtrace_run_appsec:
41+
<<: *defaults
42+
env: {"DD_APPSEC_ENABLED": "true"}
43+
ddtrace_run: true
44+
ddtrace_run_profiling:
45+
<<: *defaults
46+
env: {"DD_PROFILING_ENABLED": "true"}
47+
ddtrace_run: true
48+
ddtrace_run_telemetry_enabled:
49+
<<: *defaults
50+
env: {"_DD_INSTRUMENTATION_TELEMETRY_TESTS_FORCE_APP_STARTED": "true"}
51+
ddtrace_run: true
52+
ddtrace_run_telemetry_disabled:
53+
<<: *defaults
54+
env: {"DD_INSTRUMENTATION_TELEMETRY_ENABLED": "false", "_DD_INSTRUMENTATION_TELEMETRY_TESTS_FORCE_APP_STARTED": "false"}
55+
ddtrace_run: true
56+
ddtrace_run_send_span:
57+
<<: *defaults
58+
send_span: true
59+
ddtrace_run_runtime_metrics:
60+
<<: *defaults
61+
env: {"DD_RUNTIME_METRICS_ENABLED": "true"}
62+
ddtrace_run: true

benchmarks/startup/scenario.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
class Startup(bm.Scenario):
99
import_ddtrace: bool
1010
import_ddtrace_auto: bool
11+
ddtrace_run: bool
1112
import_flask: bool
1213
import_django: bool
14+
send_span: bool
1315
env: str
1416

1517
def run(self):
@@ -33,8 +35,15 @@ def run(self):
3335
# `import django` doesn't really do anything, `django.core.management` is what `manage.py` uses
3436
commands.append("import django.core.management")
3537

38+
if self.send_span:
39+
commands.append("from ddtrace.trace import tracer")
40+
commands.append("tracer.trace('test-x', service='bench-test').finish()")
41+
3642
args = ["python", "-c"] + [";".join(commands)]
3743

44+
if self.ddtrace_run:
45+
args = ["ddtrace-run"] + args
46+
3847
def _(loops: int):
3948
for _ in range(loops):
4049
subprocess.check_call(args=args, env=env)

ddtrace/_trace/context.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
List[SpanLink], # span_links
3131
Dict[str, Any], # baggage
3232
bool, # is_remote
33+
bool, # _reactivate
3334
]
3435

3536

@@ -104,11 +105,21 @@ def __getstate__(self) -> _ContextState:
104105
self._span_links,
105106
self._baggage,
106107
self._is_remote,
108+
self._reactivate,
107109
# Note: self._lock is not serializable
108110
)
109111

110112
def __setstate__(self, state: _ContextState) -> None:
111-
self.trace_id, self.span_id, self._meta, self._metrics, self._span_links, self._baggage, self._is_remote = state
113+
(
114+
self.trace_id,
115+
self.span_id,
116+
self._meta,
117+
self._metrics,
118+
self._span_links,
119+
self._baggage,
120+
self._is_remote,
121+
self._reactivate,
122+
) = state
112123
# We cannot serialize and lock, so we must recreate it unless we already have one
113124
self._lock = threading.RLock()
114125

0 commit comments

Comments
 (0)