chore(tracing): [2/n] support Python 3.15 coroutine and generator wrapping#17531
chore(tracing): [2/n] support Python 3.15 coroutine and generator wrapping#17531vlad-scherbich wants to merge 15 commits into
Conversation
aa07e99 to
06e9017
Compare
Codeowners resolved as |
🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: d52c831 | Docs | Datadog PR Page | Give us feedback! |
Performance SLOsComparing candidate vlad/ddtracepy-315-tracing-wrapping (b17e204) with baseline main (31b23df) 📈 Performance Regressions (3 suites)📈 iastaspects - 118/118✅ add_aspectTime: ✅ 104.458µs (SLO: <130.000µs 📉 -19.6%) vs baseline: +3.1% Memory: ✅ 43.937MB (SLO: <46.000MB -4.5%) vs baseline: +4.7% ✅ add_inplace_aspectTime: ✅ 101.118µs (SLO: <130.000µs 📉 -22.2%) vs baseline: -0.2% Memory: ✅ 43.976MB (SLO: <46.000MB -4.4%) vs baseline: +4.9% ✅ add_inplace_noaspectTime: ✅ 28.286µs (SLO: <40.000µs 📉 -29.3%) vs baseline: +0.4% Memory: ✅ 44.000MB (SLO: <46.000MB -4.3%) vs baseline: +5.0% ✅ add_noaspectTime: ✅ 49.004µs (SLO: <70.000µs 📉 -30.0%) vs baseline: -0.3% Memory: ✅ 43.890MB (SLO: <46.000MB -4.6%) vs baseline: +4.9% ✅ bytearray_aspectTime: ✅ 267.915µs (SLO: <400.000µs 📉 -33.0%) vs baseline: +0.3% Memory: ✅ 43.893MB (SLO: <46.000MB -4.6%) vs baseline: +4.6% ✅ bytearray_extend_aspectTime: ✅ 657.349µs (SLO: <800.000µs 📉 -17.8%) vs baseline: +0.5% Memory: ✅ 43.921MB (SLO: <46.000MB -4.5%) vs baseline: +5.0% ✅ bytearray_extend_noaspectTime: ✅ 272.658µs (SLO: <400.000µs 📉 -31.8%) vs baseline: +0.2% Memory: ✅ 43.962MB (SLO: <46.000MB -4.4%) vs baseline: +5.0% ✅ bytearray_noaspectTime: ✅ 146.723µs (SLO: <300.000µs 📉 -51.1%) vs baseline: +0.5% Memory: ✅ 44.017MB (SLO: <46.000MB -4.3%) vs baseline: +5.1% ✅ bytes_aspectTime: ✅ 231.806µs (SLO: <300.000µs 📉 -22.7%) vs baseline: -0.3% Memory: ✅ 43.999MB (SLO: <46.000MB -4.4%) vs baseline: +5.0% ✅ bytes_noaspectTime: ✅ 139.734µs (SLO: <200.000µs 📉 -30.1%) vs baseline: -0.3% Memory: ✅ 43.881MB (SLO: <46.000MB -4.6%) vs baseline: +4.7% ✅ bytesio_aspectTime: ✅ 3.849ms (SLO: <5.000ms 📉 -23.0%) vs baseline: +0.5% Memory: ✅ 43.866MB (SLO: <46.000MB -4.6%) vs baseline: +5.1% ✅ bytesio_noaspectTime: ✅ 320.024µs (SLO: <420.000µs 📉 -23.8%) vs baseline: -0.3% Memory: ✅ 43.974MB (SLO: <46.000MB -4.4%) vs baseline: +5.2% ✅ capitalize_aspectTime: ✅ 89.666µs (SLO: <300.000µs 📉 -70.1%) vs baseline: +0.8% Memory: ✅ 43.939MB (SLO: <46.000MB -4.5%) vs baseline: +4.9% ✅ capitalize_noaspectTime: ✅ 273.488µs (SLO: <300.000µs -8.8%) vs baseline: +7.7% Memory: ✅ 43.934MB (SLO: <46.000MB -4.5%) vs baseline: +4.7% ✅ casefold_aspectTime: ✅ 89.126µs (SLO: <500.000µs 📉 -82.2%) vs baseline: -0.4% Memory: ✅ 43.749MB (SLO: <46.000MB -4.9%) vs baseline: +4.7% ✅ casefold_noaspectTime: ✅ 308.866µs (SLO: <500.000µs 📉 -38.2%) vs baseline: -1.9% Memory: ✅ 43.950MB (SLO: <46.000MB -4.5%) vs baseline: +4.9% ✅ decode_aspectTime: ✅ 86.687µs (SLO: <100.000µs 📉 -13.3%) vs baseline: -0.3% Memory: ✅ 43.948MB (SLO: <46.000MB -4.5%) vs baseline: +5.0% ✅ decode_noaspectTime: ✅ 156.594µs (SLO: <210.000µs 📉 -25.4%) vs baseline: -0.8% Memory: ✅ 43.905MB (SLO: <46.000MB -4.6%) vs baseline: +4.5% ✅ encode_aspectTime: ✅ 84.880µs (SLO: <200.000µs 📉 -57.6%) vs baseline: ~same Memory: ✅ 43.965MB (SLO: <46.000MB -4.4%) vs baseline: +4.7% ✅ encode_noaspectTime: ✅ 143.821µs (SLO: <200.000µs 📉 -28.1%) vs baseline: -0.7% Memory: ✅ 43.953MB (SLO: <46.000MB -4.4%) vs baseline: +5.2% ✅ format_aspectTime: ✅ 14.588ms (SLO: <19.200ms 📉 -24.0%) vs baseline: -0.6% Memory: ✅ 43.916MB (SLO: <46.000MB -4.5%) vs baseline: +4.6% ✅ format_map_aspectTime: ✅ 16.343ms (SLO: <21.500ms 📉 -24.0%) vs baseline: +0.1% Memory: ✅ 44.071MB (SLO: <46.000MB -4.2%) vs baseline: +5.0% ✅ format_map_noaspectTime: ✅ 362.126µs (SLO: <500.000µs 📉 -27.6%) vs baseline: +0.6% Memory: ✅ 43.873MB (SLO: <46.000MB -4.6%) vs baseline: +4.7% ✅ format_noaspectTime: ✅ 310.314µs (SLO: <500.000µs 📉 -37.9%) vs baseline: -0.6% Memory: ✅ 44.015MB (SLO: <46.000MB -4.3%) vs baseline: +5.0% ✅ index_aspectTime: ✅ 129.406µs (SLO: <300.000µs 📉 -56.9%) vs baseline: +4.8% Memory: ✅ 43.893MB (SLO: <46.000MB -4.6%) vs baseline: +4.5% ✅ index_noaspectTime: ✅ 40.309µs (SLO: <300.000µs 📉 -86.6%) vs baseline: -1.6% Memory: ✅ 43.998MB (SLO: <46.000MB -4.4%) vs baseline: +5.1% ✅ join_aspectTime: ✅ 215.630µs (SLO: <300.000µs 📉 -28.1%) vs baseline: ~same Memory: ✅ 44.037MB (SLO: <46.000MB -4.3%) vs baseline: +5.1% ✅ join_noaspectTime: ✅ 142.990µs (SLO: <300.000µs 📉 -52.3%) vs baseline: -0.2% Memory: ✅ 43.871MB (SLO: <46.000MB -4.6%) vs baseline: +4.8% ✅ ljust_aspectTime: ✅ 587.280µs (SLO: <700.000µs 📉 -16.1%) vs baseline: 📈 +17.1% Memory: ✅ 43.888MB (SLO: <46.000MB -4.6%) vs baseline: +4.7% ✅ ljust_noaspectTime: ✅ 260.670µs (SLO: <300.000µs 📉 -13.1%) vs baseline: +0.1% Memory: ✅ 43.937MB (SLO: <46.000MB -4.5%) vs baseline: +4.7% ✅ lower_aspectTime: ✅ 310.810µs (SLO: <500.000µs 📉 -37.8%) vs baseline: -1.1% Memory: ✅ 43.947MB (SLO: <46.000MB -4.5%) vs baseline: +4.8% ✅ lower_noaspectTime: ✅ 240.797µs (SLO: <300.000µs 📉 -19.7%) vs baseline: -0.6% Memory: ✅ 43.853MB (SLO: <46.000MB -4.7%) vs baseline: +4.5% ✅ lstrip_aspectTime: ✅ 0.281ms (SLO: <3.000ms 📉 -90.6%) vs baseline: +2.2% Memory: ✅ 44.002MB (SLO: <46.000MB -4.3%) vs baseline: +5.2% ✅ lstrip_noaspectTime: ✅ 0.180ms (SLO: <3.000ms 📉 -94.0%) vs baseline: +1.4% Memory: ✅ 43.940MB (SLO: <46.000MB -4.5%) vs baseline: +4.9% ✅ modulo_aspectTime: ✅ 14.251ms (SLO: <18.750ms 📉 -24.0%) vs baseline: -0.2% Memory: ✅ 43.994MB (SLO: <46.000MB -4.4%) vs baseline: +4.6% ✅ modulo_aspect_for_bytearray_bytearrayTime: ✅ 14.744ms (SLO: <19.350ms 📉 -23.8%) vs baseline: ~same Memory: ✅ 43.981MB (SLO: <46.000MB -4.4%) vs baseline: +4.6% ✅ modulo_aspect_for_bytesTime: ✅ 14.381ms (SLO: <18.900ms 📉 -23.9%) vs baseline: ~same Memory: ✅ 43.988MB (SLO: <46.000MB -4.4%) vs baseline: +4.9% ✅ modulo_aspect_for_bytes_bytearrayTime: ✅ 14.551ms (SLO: <19.150ms 📉 -24.0%) vs baseline: -0.3% Memory: ✅ 44.055MB (SLO: <46.000MB -4.2%) vs baseline: +5.0% ✅ modulo_noaspectTime: ✅ 0.362ms (SLO: <3.000ms 📉 -87.9%) vs baseline: -0.3% Memory: ✅ 43.867MB (SLO: <46.000MB -4.6%) vs baseline: +4.9% ✅ replace_aspectTime: ✅ 18.334ms (SLO: <24.000ms 📉 -23.6%) vs baseline: +0.1% Memory: ✅ 43.872MB (SLO: <46.000MB -4.6%) vs baseline: +4.5% ✅ replace_noaspectTime: ✅ 288.016µs (SLO: <400.000µs 📉 -28.0%) vs baseline: -0.3% Memory: ✅ 43.924MB (SLO: <46.000MB -4.5%) vs baseline: +4.8% ✅ repr_aspectTime: ✅ 324.279µs (SLO: <420.000µs 📉 -22.8%) vs baseline: +0.5% Memory: ✅ 43.858MB (SLO: <46.000MB -4.7%) vs baseline: +4.8% ✅ repr_noaspectTime: ✅ 47.076µs (SLO: <90.000µs 📉 -47.7%) vs baseline: +0.6% Memory: ✅ 43.919MB (SLO: <46.000MB -4.5%) vs baseline: +4.8% ✅ rstrip_aspectTime: ✅ 384.027µs (SLO: <500.000µs 📉 -23.2%) vs baseline: -0.8% Memory: ✅ 43.906MB (SLO: <46.000MB -4.6%) vs baseline: +5.1% ✅ rstrip_noaspectTime: ✅ 185.671µs (SLO: <300.000µs 📉 -38.1%) vs baseline: -1.1% Memory: ✅ 44.015MB (SLO: <46.000MB -4.3%) vs baseline: +5.0% ✅ slice_aspectTime: ✅ 182.265µs (SLO: <300.000µs 📉 -39.2%) vs baseline: -0.3% Memory: ✅ 43.914MB (SLO: <46.000MB -4.5%) vs baseline: +4.7% ✅ slice_noaspectTime: ✅ 54.125µs (SLO: <90.000µs 📉 -39.9%) vs baseline: -0.2% Memory: ✅ 43.904MB (SLO: <46.000MB -4.6%) vs baseline: +4.8% ✅ stringio_aspectTime: ✅ 4.614ms (SLO: <5.000ms -7.7%) vs baseline: 📈 +18.4% Memory: ✅ 43.944MB (SLO: <46.000MB -4.5%) vs baseline: +5.0% ✅ stringio_noaspectTime: ✅ 356.348µs (SLO: <500.000µs 📉 -28.7%) vs baseline: -1.2% Memory: ✅ 43.912MB (SLO: <46.000MB -4.5%) vs baseline: +4.8% ✅ strip_aspectTime: ✅ 276.984µs (SLO: <350.000µs 📉 -20.9%) vs baseline: +1.2% Memory: ✅ 43.865MB (SLO: <46.000MB -4.6%) vs baseline: +4.6% ✅ strip_noaspectTime: ✅ 176.800µs (SLO: <240.000µs 📉 -26.3%) vs baseline: -1.3% Memory: ✅ 44.049MB (SLO: <46.000MB -4.2%) vs baseline: +5.2% ✅ swapcase_aspectTime: ✅ 345.543µs (SLO: <500.000µs 📉 -30.9%) vs baseline: -0.2% Memory: ✅ 43.831MB (SLO: <46.000MB -4.7%) vs baseline: +4.5% ✅ swapcase_noaspectTime: ✅ 273.475µs (SLO: <400.000µs 📉 -31.6%) vs baseline: -1.0% Memory: ✅ 43.920MB (SLO: <46.000MB -4.5%) vs baseline: +5.0% ✅ title_aspectTime: ✅ 334.255µs (SLO: <500.000µs 📉 -33.1%) vs baseline: -0.4% Memory: ✅ 43.966MB (SLO: <46.000MB -4.4%) vs baseline: +5.0% ✅ title_noaspectTime: ✅ 267.798µs (SLO: <400.000µs 📉 -33.1%) vs baseline: +1.6% Memory: ✅ 43.904MB (SLO: <46.000MB -4.6%) vs baseline: +4.9% ✅ translate_aspectTime: ✅ 514.197µs (SLO: <700.000µs 📉 -26.5%) vs baseline: +0.2% Memory: ✅ 43.950MB (SLO: <46.000MB -4.5%) vs baseline: +4.9% ✅ translate_noaspectTime: ✅ 428.715µs (SLO: <500.000µs 📉 -14.3%) vs baseline: -1.4% Memory: ✅ 43.956MB (SLO: <46.000MB -4.4%) vs baseline: +5.0% ✅ upper_aspectTime: ✅ 310.509µs (SLO: <500.000µs 📉 -37.9%) vs baseline: -0.2% Memory: ✅ 43.941MB (SLO: <46.000MB -4.5%) vs baseline: +4.9% ✅ upper_noaspectTime: ✅ 236.566µs (SLO: <400.000µs 📉 -40.9%) vs baseline: -1.4% Memory: ✅ 43.878MB (SLO: <46.000MB -4.6%) vs baseline: +4.9% 📈 iastaspectsospath - 24/24✅ ospathbasename_aspectTime: ✅ 524.449µs (SLO: <700.000µs 📉 -25.1%) vs baseline: 📈 +25.3% Memory: ✅ 43.976MB (SLO: <46.000MB -4.4%) vs baseline: +5.1% ✅ ospathbasename_noaspectTime: ✅ 426.050µs (SLO: <700.000µs 📉 -39.1%) vs baseline: ~same Memory: ✅ 43.900MB (SLO: <46.000MB -4.6%) vs baseline: +4.8% ✅ ospathjoin_aspectTime: ✅ 631.213µs (SLO: <700.000µs -9.8%) vs baseline: -0.2% Memory: ✅ 43.909MB (SLO: <46.000MB -4.5%) vs baseline: +4.7% ✅ ospathjoin_noaspectTime: ✅ 636.067µs (SLO: <700.000µs -9.1%) vs baseline: ~same Memory: ✅ 43.865MB (SLO: <46.000MB -4.6%) vs baseline: +4.9% ✅ ospathnormcase_aspectTime: ✅ 351.708µs (SLO: <700.000µs 📉 -49.8%) vs baseline: ~same Memory: ✅ 43.931MB (SLO: <46.000MB -4.5%) vs baseline: +5.0% ✅ ospathnormcase_noaspectTime: ✅ 357.782µs (SLO: <700.000µs 📉 -48.9%) vs baseline: -0.3% Memory: ✅ 43.858MB (SLO: <46.000MB -4.7%) vs baseline: +4.7% ✅ ospathsplit_aspectTime: ✅ 487.805µs (SLO: <700.000µs 📉 -30.3%) vs baseline: +1.1% Memory: ✅ 43.905MB (SLO: <46.000MB -4.6%) vs baseline: +4.7% ✅ ospathsplit_noaspectTime: ✅ 491.359µs (SLO: <700.000µs 📉 -29.8%) vs baseline: +0.8% Memory: ✅ 43.872MB (SLO: <46.000MB -4.6%) vs baseline: +4.8% ✅ ospathsplitdrive_aspectTime: ✅ 370.972µs (SLO: <700.000µs 📉 -47.0%) vs baseline: ~same Memory: ✅ 43.945MB (SLO: <46.000MB -4.5%) vs baseline: +5.0% ✅ ospathsplitdrive_noaspectTime: ✅ 72.945µs (SLO: <700.000µs 📉 -89.6%) vs baseline: -0.5% Memory: ✅ 43.863MB (SLO: <46.000MB -4.6%) vs baseline: +4.9% ✅ ospathsplitext_aspectTime: ✅ 457.448µs (SLO: <700.000µs 📉 -34.7%) vs baseline: -0.5% Memory: ✅ 43.949MB (SLO: <46.000MB -4.5%) vs baseline: +4.9% ✅ ospathsplitext_noaspectTime: ✅ 467.099µs (SLO: <700.000µs 📉 -33.3%) vs baseline: +0.9% Memory: ✅ 44.048MB (SLO: <46.000MB -4.2%) vs baseline: +5.2% 📈 telemetryaddmetric - 30/30✅ 1-count-metric-1-timesTime: ✅ 2.342µs (SLO: <20.000µs 📉 -88.3%) vs baseline: 📈 +10.1% Memory: ✅ 36.628MB (SLO: <38.000MB -3.6%) vs baseline: +5.0% ✅ 1-count-metrics-100-timesTime: ✅ 156.152µs (SLO: <220.000µs 📉 -29.0%) vs baseline: +0.2% Memory: ✅ 36.569MB (SLO: <38.000MB -3.8%) vs baseline: +4.5% ✅ 1-distribution-metric-1-timesTime: ✅ 2.460µs (SLO: <20.000µs 📉 -87.7%) vs baseline: +0.5% Memory: ✅ 36.451MB (SLO: <38.000MB -4.1%) vs baseline: +4.5% ✅ 1-distribution-metrics-100-timesTime: ✅ 167.611µs (SLO: <230.000µs 📉 -27.1%) vs baseline: ~same Memory: ✅ 36.569MB (SLO: <38.000MB -3.8%) vs baseline: +4.8% ✅ 1-gauge-metric-1-timesTime: ✅ 2.343µs (SLO: <20.000µs 📉 -88.3%) vs baseline: +0.3% Memory: ✅ 36.530MB (SLO: <38.000MB -3.9%) vs baseline: +5.0% ✅ 1-gauge-metrics-100-timesTime: ✅ 169.180µs (SLO: <190.000µs 📉 -11.0%) vs baseline: -0.1% Memory: ✅ 36.569MB (SLO: <38.000MB -3.8%) vs baseline: +4.7% ✅ 1-rate-metric-1-timesTime: ✅ 2.247µs (SLO: <20.000µs 📉 -88.8%) vs baseline: -2.0% Memory: ✅ 36.687MB (SLO: <38.000MB -3.5%) vs baseline: +5.5% ✅ 1-rate-metrics-100-timesTime: ✅ 169.151µs (SLO: <250.000µs 📉 -32.3%) vs baseline: -0.7% Memory: ✅ 36.510MB (SLO: <38.000MB -3.9%) vs baseline: +4.8% ✅ 100-count-metrics-100-timesTime: ✅ 15.665ms (SLO: <22.000ms 📉 -28.8%) vs baseline: -0.1% Memory: ✅ 36.549MB (SLO: <38.000MB -3.8%) vs baseline: +4.7% ✅ 100-distribution-metrics-100-timesTime: ✅ 1.778ms (SLO: <2.550ms 📉 -30.3%) vs baseline: +0.2% Memory: ✅ 36.589MB (SLO: <38.000MB -3.7%) vs baseline: +4.9% ✅ 100-gauge-metrics-100-timesTime: ✅ 1.735ms (SLO: <1.850ms -6.2%) vs baseline: -0.3% Memory: ✅ 36.608MB (SLO: <38.000MB -3.7%) vs baseline: +4.5% ✅ 100-rate-metrics-100-timesTime: ✅ 1.744ms (SLO: <2.550ms 📉 -31.6%) vs baseline: +0.2% Memory: ✅ 36.667MB (SLO: <38.000MB -3.5%) vs baseline: +5.1% ✅ flush-1-metricTime: ✅ 3.574µs (SLO: <20.000µs 📉 -82.1%) vs baseline: -0.9% Memory: ✅ 36.746MB (SLO: <38.000MB -3.3%) vs baseline: +5.1% ✅ flush-100-metricsTime: ✅ 176.870µs (SLO: <250.000µs 📉 -29.3%) vs baseline: +1.4% Memory: ✅ 36.530MB (SLO: <38.000MB -3.9%) vs baseline: +4.7% ✅ flush-1000-metricsTime: ✅ 2.190ms (SLO: <2.500ms 📉 -12.4%) vs baseline: +0.3% Memory: ✅ 37.316MB (SLO: <38.750MB -3.7%) vs baseline: +4.9% 🟡 Near SLO Breach (6 suites)🟡 djangosimple - 28/28✅ appsecTime: ✅ 19.636ms (SLO: <22.300ms 📉 -11.9%) vs baseline: +0.2% Memory: ✅ 71.699MB (SLO: <73.500MB -2.5%) vs baseline: +5.0% ✅ exception-replay-enabledTime: ✅ 1.373ms (SLO: <1.450ms -5.3%) vs baseline: ~same Memory: ✅ 69.885MB (SLO: <71.500MB -2.3%) vs baseline: +4.8% ✅ iastTime: ✅ 19.639ms (SLO: <22.250ms 📉 -11.7%) vs baseline: ~same Memory: ✅ 71.438MB (SLO: <75.000MB -4.7%) vs baseline: +4.9% ✅ profilerTime: ✅ 15.170ms (SLO: <16.550ms -8.3%) vs baseline: -0.1% Memory: ✅ 60.406MB (SLO: <61.000MB 🟡 -1.0%) vs baseline: +5.0% ✅ resource-renamingTime: ✅ 19.500ms (SLO: <21.750ms 📉 -10.3%) vs baseline: ~same Memory: ✅ 71.606MB (SLO: <73.500MB -2.6%) vs baseline: +4.8% ✅ span-code-originTime: ✅ 20.066ms (SLO: <28.200ms 📉 -28.8%) vs baseline: +0.7% Memory: ✅ 71.651MB (SLO: <75.000MB -4.5%) vs baseline: +4.9% ✅ tracerTime: ✅ 19.696ms (SLO: <21.750ms -9.4%) vs baseline: +0.6% Memory: ✅ 71.722MB (SLO: <75.000MB -4.4%) vs baseline: +5.0% ✅ tracer-and-profilerTime: ✅ 20.973ms (SLO: <23.500ms 📉 -10.8%) vs baseline: -0.3% Memory: ✅ 73.656MB (SLO: <75.000MB 🟡 -1.8%) vs baseline: +5.1% ✅ tracer-dont-create-db-spansTime: ✅ 19.694ms (SLO: <21.500ms -8.4%) vs baseline: -0.2% Memory: ✅ 71.474MB (SLO: <75.000MB -4.7%) vs baseline: +4.6% ✅ tracer-minimalTime: ✅ 17.906ms (SLO: <18.500ms -3.2%) vs baseline: ~same Memory: ✅ 71.551MB (SLO: <75.000MB -4.6%) vs baseline: +4.9% ✅ tracer-no-cachesTime: ✅ 18.774ms (SLO: <19.650ms -4.5%) vs baseline: -0.6% Memory: ✅ 71.648MB (SLO: <75.000MB -4.5%) vs baseline: +4.9% ✅ tracer-no-databasesTime: ✅ 20.658ms (SLO: <21.100ms -2.1%) vs baseline: +0.1% Memory: ✅ 71.369MB (SLO: <75.000MB -4.8%) vs baseline: +4.5% ✅ tracer-no-middlewareTime: ✅ 19.413ms (SLO: <21.500ms -9.7%) vs baseline: +0.4% Memory: ✅ 71.329MB (SLO: <75.000MB -4.9%) vs baseline: +4.4% ✅ tracer-no-templatesTime: ✅ 19.654ms (SLO: <22.000ms 📉 -10.7%) vs baseline: +1.8% Memory: ✅ 71.380MB (SLO: <73.500MB -2.9%) vs baseline: +4.5% 🟡 iastpropagation - 8/8✅ no-propagationTime: ✅ 48.812µs (SLO: <60.000µs 📉 -18.6%) vs baseline: ~same Memory: ✅ 41.111MB (SLO: <42.000MB -2.1%) vs baseline: +4.9% ✅ propagation_enabledTime: ✅ 137.740µs (SLO: <190.000µs 📉 -27.5%) vs baseline: -0.7% Memory: ✅ 41.071MB (SLO: <42.000MB -2.2%) vs baseline: +4.5% ✅ propagation_enabled_100Time: ✅ 1.572ms (SLO: <2.300ms 📉 -31.7%) vs baseline: +0.4% Memory: ✅ 41.111MB (SLO: <42.000MB -2.1%) vs baseline: +4.3% ✅ propagation_enabled_1000Time: ✅ 29.373ms (SLO: <34.550ms 📉 -15.0%) vs baseline: +0.3% Memory: ✅ 41.229MB (SLO: <42.000MB 🟡 -1.8%) vs baseline: +5.1% 🟡 packagesupdateimporteddependencies - 24/24 (1 unstable)✅ import_manyTime: ✅ 168.505µs (SLO: <170.000µs 🟡 -0.9%) vs baseline: +0.1% Memory: ✅ 41.227MB (SLO: <46.000MB 📉 -10.4%) vs baseline: +4.1% ✅ import_many_cachedTime: ✅ 132.991µs (SLO: <170.000µs 📉 -21.8%) vs baseline: +1.0% Memory: ✅ 41.083MB (SLO: <46.000MB 📉 -10.7%) vs baseline: +5.1% ✅ import_many_stdlibTime: ✅ 1.259ms (SLO: <1.750ms 📉 -28.1%) vs baseline: +0.8% Memory: ✅ 41.300MB (SLO: <46.000MB 📉 -10.2%) vs baseline: +5.9%
|
|
FYI I'm hoping we can get python/cpython#146182 merged before the 3.15 beta is cut so that we can move away from bytecode manipulations 🤞. |
d39d6bc to
085f281
Compare
4526b3b to
4d5a9de
Compare
d379be4 to
8f689cf
Compare
8f689cf to
4cada08
Compare
@vlad-scherbich The PR is merged so we can look into the sys.monitoring alternative implementation instead. |
| _is_testing_instrumentation_for_waf = False | ||
|
|
||
| # IAST supported on python 3.6 to 3.13 and never on windows | ||
| _iast_supported: bool = ((3, 6, 0) <= sys.version_info < (3, 15, 0)) and not ( |
There was a problem hiding this comment.
do we want to keep this as 3.15 until we can confirm that iast is actually supported on 3.15?
KowalskiThomas
left a comment
There was a problem hiding this comment.
I guess this is on hold until we decide on sys.monitoring vs bytecode approach?
@KowalskiThomas Yes, this is correct. I will change this PR to Draft mode to indicate that. |
Bumps the upper bound on requires-python from <3.15 to <3.16 and adds the 3.15 trove classifier so `pip install -e .` works inside Python 3.15 virtualenvs. Without this, build_base_venvs[3.15] fails at the editable dev install step with: ERROR: Package 'ddtrace' requires a different Python: 3.15.0 not in '<3.15,>=3.9' Pairs with the pyenv 3.15-dev wiring already on this branch.
CPython 3.15 changed two bytecode operands in async/generator code paths: - YIELD_VALUE in SEND loops (await): 0 → 1 - RESUME after async gen yield-to-caller: 1 → 5 asyncs.py: new 3.15 branch with updated operands; ASYNC_HEAD and COROUTINE_ASSEMBLY structure identical to 3.14, ASYNC_GEN_ASSEMBLY yield_value updated in all three await loops (presend0/1/2) and resume updated in the yield-to-caller section. generators.py: new 3.15 branch identical to 3.14 — generator yields inside try blocks still use RESUME 1 in 3.15 (only unprotected yields changed to RESUME 5). context.py: extended 3.13 branch to cover 3.15 — no bytecode changes needed for context enter/exit/return assembly. All version guards bumped from >= (3,15) to >= (3,16). Validated on Python 3.15.0a7: coroutine, generator, async generator, and generator throw all pass.
The 3.13 INJECTION_ASSEMBLY (load_const/push_null/call/pop_top) is valid on 3.15 — no call convention changes were made. Bump the NotImplementedError guard from 3.15 to 3.16.
…can't parse Python 3.15 code bytecode 0.17.0 (max Python 3.14) raises IndexError in Bytecode.from_code() on some Python 3.15 code objects. Catch it and return early rather than propagating to callers — e.g. @lazy in module.py and product plugin loading — which would log an ERROR to stderr and fail subprocess tests.
… context wrapping bytecode 0.17.0 does not know the stack effect of CLEANUP_THROW (new in 3.15 for async-generator throw handling), causing cfg.compute_stacksize() to raise RuntimeError. Fall back to an explicit stacksize when this happens on 3.15+.
…ing verified working
…ython 3.15 The context wrap() call site already caught IndexError raised by bytecode 0.17.0 (max Python 3.14) when parsing some 3.15 code objects, but the matching unwrap() call site in _UniversalWrappingContext did not. If wrap() ever succeeded on a function whose bytecode later became unparseable on 3.15, unwrap() would propagate the IndexError to callers (debugging probes, tracing context teardown, etc.). Wrap the unwrap() Bytecode.from_code() call with the same guard so the "no-crash on 3.15" property holds across both directions of context wrapping. Also collapse the inline `import logging as _logging` in the existing wrap() guard to use the module-level `log` for consistency. Profiling (ddtrace/internal/wrapping/__init__.py) does not call Bytecode.from_code on user code, so this guard does not affect it.
b17e204 to
d52c831
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
BenchmarksBenchmark execution time: 2026-05-01 20:31:20 Comparing candidate commit d52c831 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 575 metrics, 4 unstable metrics. scenario:iastaspectsospath-ospathbasename_aspect
scenario:telemetryaddmetric-1-count-metric-1-times
|
…e job memory (#17710) [PROF-14348](https://datadoghq.atlassian.net/browse/PROF-14348) | [Next PR >](#17531) ## Summary This is [1/n] in the Python 3.15 support stack for `dd-trace-py`. Two small CI fixes needed for introducing v3.15 builds to the repo. * add 3.15-dev to pyenv global in `testrunner`** — otherwise builds error with `pyenv: version '3.15' not installed`. * bump `check_requirements_lockfiles` memory to 8 GiB. Done because `check_requirements_lockfiles` had no explicit Kubernetes resource requests. VPA had learned a 4 GiB limit from past runs, but adding new 3.15 profiling venvs to `riotfile.py` pushes peak memory over that threshold, resulting in OOMKilled; e.g. [job 1622555236](https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-py/-/jobs/1622555236). ## Test plan * CI [PROF-14348]: https://datadoghq.atlassian.net/browse/PROF-14348?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: vlad.scherbich <vlad.scherbich@datadoghq.com>
|
Closing in favor of #17849 |

PROF-14200
< Prev PR | Next PR >
Description
This PR is a prerequisite for the profiling PR (3/n), since CPython 3.15 changed two bytecode operands used by ddtrace's async/generator wrapping machinery. It is causing ddtrace to raise
NotImplementedErrorat import time.This PR adds the 3.15 assembly branches to
asyncs.py,generators.py, andcontext.py.Changed bytecode operands:
YIELD_VALUEin SEND loops (await):0 → 1RESUMEafter async gen yield-to-caller:1 → 5Code Changes
asyncs.py: new 3.15 branch with updated operands; ASYNC_HEAD and COROUTINE_ASSEMBLY structure identical to 3.14, ASYNC_GEN_ASSEMBLY yield_value updated in all three await loops (presend0/1/2) and resume updated in the yield-to-caller section.
generators.py: new 3.15 branch identical to 3.14 — generator yields inside try blocks still use RESUME 1 in 3.15 (only unprotected yields changed to RESUME 5).
context.py: extended 3.13 branch to cover 3.15 — no bytecode changes needed for context enter/exit/return assembly.
Testing
Risks
Additional Notes
python/cpython #146182 may land before 3.15 beta and eliminate the need for bytecode manipulation. In that case, we'll follow up with another PR.