Skip to content

Conversation

vitor-de-araujo
Copy link
Contributor

@vitor-de-araujo vitor-de-araujo commented Jul 23, 2025

When pytest is run with log capture on (which is the default, unless -s or similar is used), it replaces sys.stdout and sys.stderr with temporary file descriptors that are closed at the end of the test session. If a custom logger is created referencing one of those streams, any logs emitted after the end of the test session will try to write to the closed file descriptor, leading to an I/O operation on closed file error. See #12018 for example cases.

Annoyingly, this happens even if ddtrace is not explicitly enabled in pytest with --ddtrace, because before we even have the opportunity to parse command line arguments, ddtrace/__init__.py will load, which sets up a bunch of things, including loggers.

At the beginning of a pytest session, we call a take_over_logger_stream_handler() function which sets up the ddtrace logger specifically for test runs. This PR:

  • Changes take_over_logger_stream_handler() to not propagate logs from the ddtrace handler to the root handler. This means the ddtrace handler will not be affected by custom loggers by default.

  • Makes take_over_logger_stream_handler() run even if --ddtrace is not enabled. This is not the ideal solution in the sky: ideally we would not enable ddtrace features at all when --ddtrace is not activated, however this is a bigger change to the way ddtrace works at the moment, so this PR focuses on avoiding the logging issue.

Finally, this change makes the current tests that use caplog to check for logs emitted by ddtrace to break, because caplog depends on the logs being propagated to the root logger to capture them, so this PR adds a wrapping caplog fixture in our conftest.py that re-enables log propagation for those tests. (The alternative would be changing every caplog.at_level(lvl) call in our tests to caplog.at_level(lvl, "ddtrace"), but there are a lot of them.)

Checklist

  • 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
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Copy link
Contributor

github-actions bot commented Jul 23, 2025

CODEOWNERS have been resolved as:

releasenotes/notes/ci_visibility-fix-pytest-log-capture-b135eb77a4fcd2b9.yaml  @DataDog/apm-python
ddtrace/contrib/internal/pytest/_plugin_v2.py                           @DataDog/ci-app-libraries
ddtrace/internal/ci_visibility/utils.py                                 @DataDog/ci-app-libraries
tests/conftest.py                                                       @DataDog/apm-core-python
tests/contrib/pytest/test_pytest.py                                     @DataDog/ci-app-libraries

Copy link
Contributor

github-actions bot commented Jul 23, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 276 ± 2 ms.

The average import time from base is: 278 ± 2 ms.

The import time difference between this PR and base is: -2.19 ± 0.08 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 2.027 ms (0.73%)
ddtrace.bootstrap.sitecustomize 1.352 ms (0.49%)
ddtrace.bootstrap.preload 1.352 ms (0.49%)
ddtrace.internal.remoteconfig.client 0.669 ms (0.24%)
ddtrace 0.674 ms (0.24%)
ddtrace.internal._unpatched 0.031 ms (0.01%)
json 0.031 ms (0.01%)
json.decoder 0.031 ms (0.01%)
re 0.031 ms (0.01%)
enum 0.031 ms (0.01%)
types 0.031 ms (0.01%)

@vitor-de-araujo vitor-de-araujo marked this pull request as ready for review July 23, 2025 16:22
@vitor-de-araujo vitor-de-araujo requested review from a team as code owners July 23, 2025 16:22
Copy link
Member

@gnufede gnufede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! 👏

Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@vitor-de-araujo vitor-de-araujo enabled auto-merge (squash) July 23, 2025 17:02
@pr-commenter
Copy link

pr-commenter bot commented Jul 23, 2025

Performance SLOs

Benchmark execution time: 2025-07-23 19:48:37

Comparing candidate commit d03fa73 in branch vitor-de-araujo/APMS-16576/the-zombie-logger with performance thresholds.

Performance Test Results

Legend: ✅ Pass | ⚠️ Unstable | ❌ Fail

⚠️ coreapiscenario - 12/12 (2 unstable)

⚠️ context_with_data_listeners

Metric Status Value SLO % Under SLO
execution_time ⚠️ 13.858µs < 20.000µs +30.7%
max_rss_usage 29.137MB < 31.000MB +6.0%

✅ context_with_data_no_listeners

Metric Status Value SLO % Under SLO
execution_time 3.790µs < 10.000µs +62.1%
max_rss_usage 29.059MB < 31.000MB +6.3%

⚠️ context_with_data_only_all_listeners

Metric Status Value SLO % Under SLO
execution_time ⚠️ 13.828µs < 20.000µs +30.9%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ get_item_exists

Metric Status Value SLO % Under SLO
execution_time 633.466ns < 10.000µs +93.7%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ get_item_missing

Metric Status Value SLO % Under SLO
execution_time 684.231ns < 10.000µs +93.2%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ set_item

Metric Status Value SLO % Under SLO
execution_time 25.007µs < 30.000µs +16.6%
max_rss_usage 29.039MB < 31.000MB +6.3%
djangosimple - 22/22

✅ appsec

Metric Status Value SLO % Under SLO
execution_time 21.348ms < 22.300ms +4.3%
max_rss_usage 63.740MB < 65.500MB +2.7%

✅ exception-replay-enabled

Metric Status Value SLO % Under SLO
execution_time 1.353ms < 1.450ms +6.7%
max_rss_usage 63.563MB < 65.500MB +3.0%

✅ iast

Metric Status Value SLO % Under SLO
execution_time 21.400ms < 22.250ms +3.8%
max_rss_usage 63.740MB < 65.500MB +2.7%

✅ profiler

Metric Status Value SLO % Under SLO
execution_time 15.996ms < 16.550ms +3.3%
max_rss_usage 50.781MB < 53.000MB +4.2%

✅ span-code-origin

Metric Status Value SLO % Under SLO
execution_time 27.068ms < 28.200ms +4.0%
max_rss_usage 66.260MB < 68.000MB +2.6%

✅ tracer

Metric Status Value SLO % Under SLO
execution_time 21.296ms < 22.700ms +6.2%
max_rss_usage 63.701MB < 65.500MB +2.7%

✅ tracer-and-profiler

Metric Status Value SLO % Under SLO
execution_time 23.813ms < 24.900ms +4.4%
max_rss_usage 65.117MB < 67.000MB +2.8%

✅ tracer-no-caches

Metric Status Value SLO % Under SLO
execution_time 18.892ms < 19.650ms +3.9%
max_rss_usage 63.721MB < 65.500MB +2.7%

✅ tracer-no-databases

Metric Status Value SLO % Under SLO
execution_time 19.245ms < 20.100ms +4.3%
max_rss_usage 63.721MB < 65.500MB +2.7%

✅ tracer-no-middleware

Metric Status Value SLO % Under SLO
execution_time 21.163ms < 22.500ms +5.9%
max_rss_usage 63.701MB < 65.500MB +2.7%

✅ tracer-no-templates

Metric Status Value SLO % Under SLO
execution_time 21.154ms < 22.250ms +4.9%
max_rss_usage 63.721MB < 65.500MB +2.7%
errortrackingdjangosimple - 6/6

✅ errortracking-enabled-all

Metric Status Value SLO % Under SLO
execution_time 18.667ms < 19.850ms +6.0%
max_rss_usage 63.701MB < 65.500MB +2.7%

✅ errortracking-enabled-user

Metric Status Value SLO % Under SLO
execution_time 18.645ms < 19.400ms +3.9%
max_rss_usage 63.701MB < 65.500MB +2.7%

✅ tracer-enabled

Metric Status Value SLO % Under SLO
execution_time 18.724ms < 19.450ms +3.7%
max_rss_usage 63.696MB < 65.500MB +2.8%
errortrackingflasksqli - 6/6

✅ errortracking-enabled-all

Metric Status Value SLO % Under SLO
execution_time 2.124ms < 2.300ms +7.7%
max_rss_usage 51.472MB < 53.000MB +2.9%

✅ errortracking-enabled-user

Metric Status Value SLO % Under SLO
execution_time 2.117ms < 2.250ms +5.9%
max_rss_usage 51.649MB < 53.000MB +2.5%

✅ tracer-enabled

Metric Status Value SLO % Under SLO
execution_time 2.112ms < 2.300ms +8.2%
max_rss_usage 51.255MB < 53.000MB +3.3%
flasksimple - 14/14

✅ appsec-get

Metric Status Value SLO % Under SLO
execution_time 4.613ms < 4.750ms +2.9%
max_rss_usage 62.981MB < 64.000MB +1.6%

✅ appsec-post

Metric Status Value SLO % Under SLO
execution_time 6.634ms < 6.750ms +1.7%
max_rss_usage 63.157MB < 64.000MB +1.3%

✅ appsec-telemetry

Metric Status Value SLO % Under SLO
execution_time 4.620ms < 4.750ms +2.7%
max_rss_usage 63.059MB < 64.000MB +1.5%

✅ debugger

Metric Status Value SLO % Under SLO
execution_time 1.857ms < 2.000ms +7.1%
max_rss_usage 42.074MB < 44.000MB +4.4%

✅ iast-get

Metric Status Value SLO % Under SLO
execution_time 1.854ms < 2.000ms +7.3%
max_rss_usage 44.499MB < 45.000MB +1.1%

✅ profiler

Metric Status Value SLO % Under SLO
execution_time 1.984ms < 2.100ms +5.5%
max_rss_usage 43.392MB < 44.000MB +1.4%

✅ tracer

Metric Status Value SLO % Under SLO
execution_time 3.393ms < 3.650ms +7.0%
max_rss_usage 51.452MB < 53.000MB +2.9%
flasksqli - 6/6

✅ appsec-enabled

Metric Status Value SLO % Under SLO
execution_time 3.981ms < 4.200ms +5.2%
max_rss_usage 63.425MB < 66.000MB +3.9%

✅ iast-enabled

Metric Status Value SLO % Under SLO
execution_time 2.562ms < 2.800ms +8.5%
max_rss_usage 56.544MB < 58.000MB +2.5%

✅ tracer-enabled

Metric Status Value SLO % Under SLO
execution_time 2.112ms < 2.250ms +6.1%
max_rss_usage 51.236MB < 53.000MB +3.3%
httppropagationextract - 60/60

✅ all_styles_all_headers

Metric Status Value SLO % Under SLO
execution_time 82.421µs < 100.000µs +17.6%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ b3_headers

Metric Status Value SLO % Under SLO
execution_time 14.314µs < 20.000µs +28.4%
max_rss_usage 29.118MB < 31.000MB +6.1%

✅ b3_single_headers

Metric Status Value SLO % Under SLO
execution_time 13.759µs < 20.000µs +31.2%
max_rss_usage 29.138MB < 31.000MB +6.0%

✅ datadog_tracecontext_tracestate_not_propagated_on_trace_id_no_match

Metric Status Value SLO % Under SLO
execution_time 66.970µs < 80.000µs +16.3%
max_rss_usage 29.138MB < 31.000MB +6.0%

✅ datadog_tracecontext_tracestate_propagated_on_trace_id_match

Metric Status Value SLO % Under SLO
execution_time 67.363µs < 80.000µs +15.8%
max_rss_usage 29.137MB < 31.000MB +6.0%

✅ empty_headers

Metric Status Value SLO % Under SLO
execution_time 1.599µs < 10.000µs +84.0%
max_rss_usage 29.058MB < 31.000MB +6.3%

✅ full_t_id_datadog_headers

Metric Status Value SLO % Under SLO
execution_time 23.923µs < 30.000µs +20.3%
max_rss_usage 29.157MB < 31.000MB +5.9%

✅ invalid_priority_header

Metric Status Value SLO % Under SLO
execution_time 6.508µs < 10.000µs +34.9%
max_rss_usage 29.177MB < 31.000MB +5.9%

✅ invalid_span_id_header

Metric Status Value SLO % Under SLO
execution_time 6.566µs < 10.000µs +34.3%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ invalid_tags_header

Metric Status Value SLO % Under SLO
execution_time 6.563µs < 10.000µs +34.4%
max_rss_usage 29.197MB < 31.000MB +5.8%

✅ invalid_trace_id_header

Metric Status Value SLO % Under SLO
execution_time 6.537µs < 10.000µs +34.6%
max_rss_usage 29.157MB < 31.000MB +5.9%

✅ large_header_no_matches

Metric Status Value SLO % Under SLO
execution_time 27.699µs < 30.000µs +7.7%
max_rss_usage 29.137MB < 31.000MB +6.0%

✅ large_valid_headers_all

Metric Status Value SLO % Under SLO
execution_time 28.677µs < 40.000µs +28.3%
max_rss_usage 29.157MB < 31.000MB +5.9%

✅ medium_header_no_matches

Metric Status Value SLO % Under SLO
execution_time 9.880µs < 20.000µs +50.6%
max_rss_usage 29.157MB < 31.000MB +5.9%

✅ medium_valid_headers_all

Metric Status Value SLO % Under SLO
execution_time 11.291µs < 20.000µs +43.5%
max_rss_usage 29.137MB < 31.000MB +6.0%

✅ none_propagation_style

Metric Status Value SLO % Under SLO
execution_time 1.704µs < 10.000µs +83.0%
max_rss_usage 29.118MB < 31.000MB +6.1%

✅ tracecontext_headers

Metric Status Value SLO % Under SLO
execution_time 34.805µs < 40.000µs +13.0%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ valid_headers_all

Metric Status Value SLO % Under SLO
execution_time 6.497µs < 10.000µs +35.0%
max_rss_usage 29.117MB < 31.000MB +6.1%

✅ valid_headers_basic

Metric Status Value SLO % Under SLO
execution_time 6.130µs < 10.000µs +38.7%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ wsgi_empty_headers

Metric Status Value SLO % Under SLO
execution_time 1.591µs < 10.000µs +84.1%
max_rss_usage 29.137MB < 31.000MB +6.0%

✅ wsgi_invalid_priority_header

Metric Status Value SLO % Under SLO
execution_time 6.598µs < 10.000µs +34.0%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ wsgi_invalid_span_id_header

Metric Status Value SLO % Under SLO
execution_time 1.588µs < 10.000µs +84.1%
max_rss_usage 29.137MB < 31.000MB +6.0%

✅ wsgi_invalid_tags_header

Metric Status Value SLO % Under SLO
execution_time 6.627µs < 10.000µs +33.7%
max_rss_usage 29.215MB < 31.000MB +5.8%

✅ wsgi_invalid_trace_id_header

Metric Status Value SLO % Under SLO
execution_time 6.571µs < 10.000µs +34.3%
max_rss_usage 29.118MB < 31.000MB +6.1%

✅ wsgi_large_header_no_matches

Metric Status Value SLO % Under SLO
execution_time 28.709µs < 40.000µs +28.2%
max_rss_usage 29.118MB < 31.000MB +6.1%

✅ wsgi_large_valid_headers_all

Metric Status Value SLO % Under SLO
execution_time 29.777µs < 40.000µs +25.6%
max_rss_usage 29.118MB < 31.000MB +6.1%

✅ wsgi_medium_header_no_matches

Metric Status Value SLO % Under SLO
execution_time 10.145µs < 20.000µs +49.3%
max_rss_usage 29.138MB < 31.000MB +6.0%

✅ wsgi_medium_valid_headers_all

Metric Status Value SLO % Under SLO
execution_time 11.646µs < 20.000µs +41.8%
max_rss_usage 29.118MB < 31.000MB +6.1%

✅ wsgi_valid_headers_all

Metric Status Value SLO % Under SLO
execution_time 6.620µs < 10.000µs +33.8%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ wsgi_valid_headers_basic

Metric Status Value SLO % Under SLO
execution_time 6.122µs < 10.000µs +38.8%
max_rss_usage 29.059MB < 31.000MB +6.3%
httppropagationinject - 16/16

✅ ids_only

Metric Status Value SLO % Under SLO
execution_time 20.170µs < 30.000µs +32.8%
max_rss_usage 29.157MB < 31.000MB +5.9%

✅ with_all

Metric Status Value SLO % Under SLO
execution_time 34.806µs < 40.000µs +13.0%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ with_dd_origin

Metric Status Value SLO % Under SLO
execution_time 26.415µs < 30.000µs +12.0%
max_rss_usage 29.157MB < 31.000MB +5.9%

✅ with_priority_and_origin

Metric Status Value SLO % Under SLO
execution_time 28.992µs < 40.000µs +27.5%
max_rss_usage 29.157MB < 31.000MB +5.9%

✅ with_sampling_priority

Metric Status Value SLO % Under SLO
execution_time 22.520µs < 30.000µs +24.9%
max_rss_usage 29.157MB < 31.000MB +5.9%

✅ with_tags

Metric Status Value SLO % Under SLO
execution_time 28.041µs < 40.000µs +29.9%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ with_tags_invalid

Metric Status Value SLO % Under SLO
execution_time 30.997µs < 40.000µs +22.5%
max_rss_usage 29.157MB < 31.000MB +5.9%

✅ with_tags_max_size

Metric Status Value SLO % Under SLO
execution_time 28.727µs < 40.000µs +28.2%
max_rss_usage 29.078MB < 31.000MB +6.2%
iast_aspects - 40/40

✅ re_expand_aspect

Metric Status Value SLO % Under SLO
execution_time 33.157µs < 40.000µs +17.1%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ re_expand_noaspect

Metric Status Value SLO % Under SLO
execution_time 28.718µs < 40.000µs +28.2%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ re_findall_aspect

Metric Status Value SLO % Under SLO
execution_time 3.711µs < 10.000µs +62.9%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ re_findall_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.407µs < 10.000µs +85.9%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ re_finditer_aspect

Metric Status Value SLO % Under SLO
execution_time 5.181µs < 10.000µs +48.2%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ re_finditer_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.412µs < 10.000µs +85.9%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ re_fullmatch_aspect

Metric Status Value SLO % Under SLO
execution_time 3.390µs < 10.000µs +66.1%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ re_fullmatch_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.289µs < 10.000µs +87.1%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ re_group_aspect

Metric Status Value SLO % Under SLO
execution_time 3.484µs < 10.000µs +65.2%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ re_group_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.590µs < 10.000µs +84.1%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ re_groups_aspect

Metric Status Value SLO % Under SLO
execution_time 3.591µs < 10.000µs +64.1%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ re_groups_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.711µs < 10.000µs +82.9%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ re_match_aspect

Metric Status Value SLO % Under SLO
execution_time 3.419µs < 10.000µs +65.8%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ re_match_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.308µs < 10.000µs +86.9%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ re_search_aspect

Metric Status Value SLO % Under SLO
execution_time 3.290µs < 10.000µs +67.1%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ re_search_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.195µs < 10.000µs +88.1%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ re_sub_aspect

Metric Status Value SLO % Under SLO
execution_time 4.686µs < 10.000µs +53.1%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ re_sub_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.563µs < 10.000µs +84.4%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ re_subn_aspect

Metric Status Value SLO % Under SLO
execution_time 4.877µs < 10.000µs +51.2%
max_rss_usage 34.642MB < 35.500MB +2.4%

✅ re_subn_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.593µs < 10.000µs +84.1%
max_rss_usage 34.603MB < 35.000MB +1.1%
iastaspects - 118/118

✅ add_aspect

Metric Status Value SLO % Under SLO
execution_time 328.047ns < 10.000µs +96.7%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ add_inplace_aspect

Metric Status Value SLO % Under SLO
execution_time 328.828ns < 10.000µs +96.7%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ add_inplace_noaspect

Metric Status Value SLO % Under SLO
execution_time 320.369ns < 10.000µs +96.8%
max_rss_usage 34.662MB < 35.000MB +1.0%

✅ add_noaspect

Metric Status Value SLO % Under SLO
execution_time 277.762ns < 10.000µs +97.2%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ bytearray_aspect

Metric Status Value SLO % Under SLO
execution_time 1.864µs < 10.000µs +81.4%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ bytearray_extend_aspect

Metric Status Value SLO % Under SLO
execution_time 1.381µs < 10.000µs +86.2%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ bytearray_extend_noaspect

Metric Status Value SLO % Under SLO
execution_time 615.034ns < 10.000µs +93.8%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ bytearray_noaspect

Metric Status Value SLO % Under SLO
execution_time 480.240ns < 10.000µs +95.2%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ bytes_aspect

Metric Status Value SLO % Under SLO
execution_time 1.881µs < 10.000µs +81.2%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ bytes_noaspect

Metric Status Value SLO % Under SLO
execution_time 493.088ns < 10.000µs +95.1%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ bytesio_aspect

Metric Status Value SLO % Under SLO
execution_time 1.906µs < 10.000µs +80.9%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ bytesio_noaspect

Metric Status Value SLO % Under SLO
execution_time 504.442ns < 10.000µs +95.0%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ capitalize_aspect

Metric Status Value SLO % Under SLO
execution_time 740.927ns < 10.000µs +92.6%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ capitalize_noaspect

Metric Status Value SLO % Under SLO
execution_time 433.863ns < 10.000µs +95.7%
max_rss_usage 34.662MB < 35.000MB +1.0%

✅ casefold_aspect

Metric Status Value SLO % Under SLO
execution_time 732.562ns < 10.000µs +92.7%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ casefold_noaspect

Metric Status Value SLO % Under SLO
execution_time 369.220ns < 10.000µs +96.3%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ decode_aspect

Metric Status Value SLO % Under SLO
execution_time 726.846ns < 10.000µs +92.7%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ decode_noaspect

Metric Status Value SLO % Under SLO
execution_time 421.461ns < 10.000µs +95.8%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ encode_aspect

Metric Status Value SLO % Under SLO
execution_time 708.518ns < 10.000µs +92.9%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ encode_noaspect

Metric Status Value SLO % Under SLO
execution_time 399.793ns < 10.000µs +96.0%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ format_aspect

Metric Status Value SLO % Under SLO
execution_time 3.361µs < 10.000µs +66.4%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ format_map_aspect

Metric Status Value SLO % Under SLO
execution_time 3.221µs < 10.000µs +67.8%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ format_map_noaspect

Metric Status Value SLO % Under SLO
execution_time 769.501ns < 10.000µs +92.3%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ format_noaspect

Metric Status Value SLO % Under SLO
execution_time 592.064ns < 10.000µs +94.1%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ index_aspect

Metric Status Value SLO % Under SLO
execution_time 338.209ns < 10.000µs +96.6%
max_rss_usage 34.662MB < 35.000MB +1.0%

✅ index_noaspect

Metric Status Value SLO % Under SLO
execution_time 279.912ns < 10.000µs +97.2%
max_rss_usage 34.701MB < 35.000MB +0.9%

✅ join_aspect

Metric Status Value SLO % Under SLO
execution_time 1.210µs < 10.000µs +87.9%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ join_noaspect

Metric Status Value SLO % Under SLO
execution_time 490.204ns < 10.000µs +95.1%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ ljust_aspect

Metric Status Value SLO % Under SLO
execution_time 10.262µs < 20.000µs +48.7%
max_rss_usage 34.681MB < 35.500MB +2.3%

✅ ljust_noaspect

Metric Status Value SLO % Under SLO
execution_time 406.270ns < 10.000µs +95.9%
max_rss_usage 34.623MB < 35.500MB +2.5%

✅ lower_aspect

Metric Status Value SLO % Under SLO
execution_time 2.279µs < 10.000µs +77.2%
max_rss_usage 34.603MB < 35.500MB +2.5%

✅ lower_noaspect

Metric Status Value SLO % Under SLO
execution_time 370.150ns < 10.000µs +96.3%
max_rss_usage 34.681MB < 35.000MB +0.9%

✅ lstrip_aspect

Metric Status Value SLO % Under SLO
execution_time 10.305µs < 20.000µs +48.5%
max_rss_usage 34.761MB < 35.500MB +2.1%

✅ lstrip_noaspect

Metric Status Value SLO % Under SLO
execution_time 380.250ns < 10.000µs +96.2%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ modulo_aspect

Metric Status Value SLO % Under SLO
execution_time 597.766ns < 10.000µs +94.0%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ modulo_aspect_for_bytearray_bytearray

Metric Status Value SLO % Under SLO
execution_time 1.263µs < 10.000µs +87.4%
max_rss_usage 34.662MB < 35.000MB +1.0%

✅ modulo_aspect_for_bytes

Metric Status Value SLO % Under SLO
execution_time 746.477ns < 10.000µs +92.5%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ modulo_aspect_for_bytes_bytearray

Metric Status Value SLO % Under SLO
execution_time 978.049ns < 10.000µs +90.2%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ modulo_noaspect

Metric Status Value SLO % Under SLO
execution_time 624.115ns < 10.000µs +93.8%
max_rss_usage 34.662MB < 35.000MB +1.0%

✅ replace_aspect

Metric Status Value SLO % Under SLO
execution_time 4.637µs < 10.000µs +53.6%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ replace_noaspect

Metric Status Value SLO % Under SLO
execution_time 460.878ns < 10.000µs +95.4%
max_rss_usage 34.603MB < 35.500MB +2.5%

✅ repr_aspect

Metric Status Value SLO % Under SLO
execution_time 912.361ns < 10.000µs +90.9%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ repr_noaspect

Metric Status Value SLO % Under SLO
execution_time 409.780ns < 10.000µs +95.9%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ rstrip_aspect

Metric Status Value SLO % Under SLO
execution_time 10.220µs < 20.000µs +48.9%
max_rss_usage 34.740MB < 35.500MB +2.1%

✅ rstrip_noaspect

Metric Status Value SLO % Under SLO
execution_time 376.620ns < 10.000µs +96.2%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ slice_aspect

Metric Status Value SLO % Under SLO
execution_time 480.272ns < 10.000µs +95.2%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ slice_noaspect

Metric Status Value SLO % Under SLO
execution_time 441.322ns < 10.000µs +95.6%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ stringio_aspect

Metric Status Value SLO % Under SLO
execution_time 2.201µs < 10.000µs +78.0%
max_rss_usage 34.662MB < 35.000MB +1.0%

✅ stringio_noaspect

Metric Status Value SLO % Under SLO
execution_time 725.721ns < 10.000µs +92.7%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ strip_aspect

Metric Status Value SLO % Under SLO
execution_time 10.320µs < 20.000µs +48.4%
max_rss_usage 34.642MB < 35.500MB +2.4%

✅ strip_noaspect

Metric Status Value SLO % Under SLO
execution_time 382.688ns < 10.000µs +96.2%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ swapcase_aspect

Metric Status Value SLO % Under SLO
execution_time 2.470µs < 10.000µs +75.3%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ swapcase_noaspect

Metric Status Value SLO % Under SLO
execution_time 538.714ns < 10.000µs +94.6%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ title_aspect

Metric Status Value SLO % Under SLO
execution_time 2.426µs < 10.000µs +75.7%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ title_noaspect

Metric Status Value SLO % Under SLO
execution_time 502.978ns < 10.000µs +95.0%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ translate_aspect

Metric Status Value SLO % Under SLO
execution_time 3.277µs < 10.000µs +67.2%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ translate_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.041µs < 10.000µs +89.6%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ upper_aspect

Metric Status Value SLO % Under SLO
execution_time 2.321µs < 10.000µs +76.8%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ upper_noaspect

Metric Status Value SLO % Under SLO
execution_time 369.510ns < 10.000µs +96.3%
max_rss_usage 34.603MB < 35.000MB +1.1%
iastaspectsospath - 24/24

✅ ospathbasename_aspect

Metric Status Value SLO % Under SLO
execution_time 4.166µs < 10.000µs +58.3%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ ospathbasename_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.083µs < 10.000µs +89.2%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ ospathjoin_aspect

Metric Status Value SLO % Under SLO
execution_time 5.995µs < 10.000µs +40.0%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ ospathjoin_noaspect

Metric Status Value SLO % Under SLO
execution_time 2.292µs < 10.000µs +77.1%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ ospathnormcase_aspect

Metric Status Value SLO % Under SLO
execution_time 3.418µs < 10.000µs +65.8%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ ospathnormcase_noaspect

Metric Status Value SLO % Under SLO
execution_time 569.029ns < 10.000µs +94.3%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ ospathsplit_aspect

Metric Status Value SLO % Under SLO
execution_time 4.832µs < 10.000µs +51.7%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ ospathsplit_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.600µs < 10.000µs +84.0%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ ospathsplitdrive_aspect

Metric Status Value SLO % Under SLO
execution_time 3.678µs < 10.000µs +63.2%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ ospathsplitdrive_noaspect

Metric Status Value SLO % Under SLO
execution_time 702.859ns < 10.000µs +93.0%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ ospathsplitext_aspect

Metric Status Value SLO % Under SLO
execution_time 4.531µs < 10.000µs +54.7%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ ospathsplitext_noaspect

Metric Status Value SLO % Under SLO
execution_time 1.384µs < 10.000µs +86.2%
max_rss_usage 34.662MB < 35.000MB +1.0%
iastaspectssplit - 12/12

✅ rsplit_aspect

Metric Status Value SLO % Under SLO
execution_time 1.518µs < 10.000µs +84.8%
max_rss_usage 34.642MB < 35.000MB +1.0%

✅ rsplit_noaspect

Metric Status Value SLO % Under SLO
execution_time 575.962ns < 10.000µs +94.2%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ split_aspect

Metric Status Value SLO % Under SLO
execution_time 1.484µs < 10.000µs +85.2%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ split_noaspect

Metric Status Value SLO % Under SLO
execution_time 572.737ns < 10.000µs +94.3%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ splitlines_aspect

Metric Status Value SLO % Under SLO
execution_time 1.413µs < 10.000µs +85.9%
max_rss_usage 34.603MB < 35.000MB +1.1%

✅ splitlines_noaspect

Metric Status Value SLO % Under SLO
execution_time 581.055ns < 10.000µs +94.2%
max_rss_usage 34.623MB < 35.000MB +1.1%
iastpropagation - 8/8

✅ no-propagation

Metric Status Value SLO % Under SLO
execution_time 48.954µs < 60.000µs +18.4%
max_rss_usage 34.623MB < 35.500MB +2.5%

✅ propagation_enabled

Metric Status Value SLO % Under SLO
execution_time 145.214µs < 160.000µs +9.2%
max_rss_usage 34.642MB < 35.500MB +2.4%

✅ propagation_enabled_100

Metric Status Value SLO % Under SLO
execution_time 1.563ms < 1.800ms +13.1%
max_rss_usage 34.623MB < 35.000MB +1.1%

✅ propagation_enabled_1000

Metric Status Value SLO % Under SLO
execution_time 29.037ms < 30.550ms +5.0%
max_rss_usage 34.681MB < 35.500MB +2.3%
otelsdkspan - 24/24

✅ add-event

Metric Status Value SLO % Under SLO
execution_time 40.601ms < 42.000ms +3.3%
max_rss_usage 31.870MB < 35.000MB +8.9%

✅ add-link

Metric Status Value SLO % Under SLO
execution_time 36.517ms < 38.550ms +5.3%
max_rss_usage 31.831MB < 35.000MB +9.1%

✅ add-metrics

Metric Status Value SLO % Under SLO
execution_time 216.819ms < 232.000ms +6.5%
max_rss_usage 31.870MB < 35.000MB +8.9%

✅ add-tags

Metric Status Value SLO % Under SLO
execution_time 211.262ms < 221.600ms +4.7%
max_rss_usage 31.870MB < 35.000MB +8.9%

✅ get-context

Metric Status Value SLO % Under SLO
execution_time 29.404ms < 31.300ms +6.1%
max_rss_usage 31.890MB < 35.000MB +8.9%

✅ is-recording

Metric Status Value SLO % Under SLO
execution_time 29.392ms < 31.000ms +5.2%
max_rss_usage 31.910MB < 35.000MB +8.8%

✅ record-exception

Metric Status Value SLO % Under SLO
execution_time 64.207ms < 65.850ms +2.5%
max_rss_usage 31.850MB < 35.000MB +9.0%

✅ set-status

Metric Status Value SLO % Under SLO
execution_time 31.984ms < 34.150ms +6.3%
max_rss_usage 31.890MB < 35.000MB +8.9%

✅ start

Metric Status Value SLO % Under SLO
execution_time 28.892ms < 30.150ms +4.2%
max_rss_usage 31.850MB < 35.000MB +9.0%

✅ start-finish

Metric Status Value SLO % Under SLO
execution_time 34.237ms < 35.350ms +3.1%
max_rss_usage 31.850MB < 35.000MB +9.0%

✅ start-finish-telemetry

Metric Status Value SLO % Under SLO
execution_time 34.091ms < 35.450ms +3.8%
max_rss_usage 31.850MB < 35.000MB +9.0%

✅ update-name

Metric Status Value SLO % Under SLO
execution_time 31.134ms < 33.400ms +6.8%
max_rss_usage 31.870MB < 35.000MB +8.9%
otelspan - 22/22

✅ add-event

Metric Status Value SLO % Under SLO
execution_time 43.880ms < 47.150ms +6.9%
max_rss_usage 42.172MB < 42.500MB +0.8%

✅ add-metrics

Metric Status Value SLO % Under SLO
execution_time 318.042ms < 344.800ms +7.8%
max_rss_usage 559.653MB < 562.000MB +0.4%

✅ add-tags

Metric Status Value SLO % Under SLO
execution_time 288.322ms < 314.000ms +8.2%
max_rss_usage 561.058MB < 563.500MB +0.4%

✅ get-context

Metric Status Value SLO % Under SLO
execution_time 84.713ms < 92.350ms +8.3%
max_rss_usage 37.228MB < 38.000MB +2.0%

✅ is-recording

Metric Status Value SLO % Under SLO
execution_time 41.561ms < 44.500ms +6.6%
max_rss_usage 41.462MB < 42.000MB +1.3%

✅ record-exception

Metric Status Value SLO % Under SLO
execution_time 60.471ms < 67.650ms +10.6%
max_rss_usage 37.639MB < 38.000MB +1.0%

✅ set-status

Metric Status Value SLO % Under SLO
execution_time 47.383ms < 50.400ms +6.0%
max_rss_usage 41.569MB < 42.000MB +1.0%

✅ start

Metric Status Value SLO % Under SLO
execution_time 40.711ms < 43.450ms +6.3%
max_rss_usage 41.423MB < 42.000MB +1.4%

✅ start-finish

Metric Status Value SLO % Under SLO
execution_time 80.761ms < 86.000ms +6.1%
max_rss_usage 31.595MB < 32.000MB +1.3%

✅ start-finish-telemetry

Metric Status Value SLO % Under SLO
execution_time 82.596ms < 86.000ms +4.0%
max_rss_usage 31.614MB < 32.000MB +1.2%

✅ update-name

Metric Status Value SLO % Under SLO
execution_time 42.772ms < 45.150ms +5.3%
max_rss_usage 41.841MB < 42.500MB +1.5%
packagespackageforrootmodulemapping - 4/4

✅ cache_off

Metric Status Value SLO % Under SLO
execution_time 341.659ms < 354.300ms +3.6%
max_rss_usage 34.593MB < 38.000MB +9.0%

✅ cache_on

Metric Status Value SLO % Under SLO
execution_time 382.692ns < 10.000µs +96.2%
max_rss_usage 33.258MB < 38.000MB +12.5%
packagesupdateimporteddependencies - 24/24

✅ import_many

Metric Status Value SLO % Under SLO
execution_time 154.642µs < 170.000µs +9.0%
max_rss_usage 34.227MB < 35.500MB +3.6%

✅ import_many_cached

Metric Status Value SLO % Under SLO
execution_time 120.605µs < 130.000µs +7.2%
max_rss_usage 33.971MB < 35.500MB +4.3%

✅ import_many_stdlib

Metric Status Value SLO % Under SLO
execution_time 1.609ms < 1.750ms +8.1%
max_rss_usage 34.161MB < 35.500MB +3.8%

✅ import_many_stdlib_cached

Metric Status Value SLO % Under SLO
execution_time 969.076µs < 1.100ms +11.9%
max_rss_usage 34.138MB < 35.500MB +3.8%

✅ import_many_unknown

Metric Status Value SLO % Under SLO
execution_time 838.002µs < 890.000µs +5.8%
max_rss_usage 34.459MB < 35.500MB +2.9%

✅ import_many_unknown_cached

Metric Status Value SLO % Under SLO
execution_time 790.570µs < 870.000µs +9.1%
max_rss_usage 34.228MB < 35.500MB +3.6%

✅ import_one

Metric Status Value SLO % Under SLO
execution_time 19.756µs < 30.000µs +34.1%
max_rss_usage 34.053MB < 35.500MB +4.1%

✅ import_one_cache

Metric Status Value SLO % Under SLO
execution_time 6.287µs < 10.000µs +37.1%
max_rss_usage 33.982MB < 35.500MB +4.3%

✅ import_one_stdlib

Metric Status Value SLO % Under SLO
execution_time 18.777µs < 20.000µs +6.1%
max_rss_usage 34.050MB < 35.500MB +4.1%

✅ import_one_stdlib_cache

Metric Status Value SLO % Under SLO
execution_time 6.296µs < 10.000µs +37.0%
max_rss_usage 34.014MB < 35.500MB +4.2%

✅ import_one_unknown

Metric Status Value SLO % Under SLO
execution_time 45.302µs < 50.000µs +9.4%
max_rss_usage 34.011MB < 35.500MB +4.2%

✅ import_one_unknown_cache

Metric Status Value SLO % Under SLO
execution_time 6.299µs < 10.000µs +37.0%
max_rss_usage 34.117MB < 35.500MB +3.9%
ratelimiter - 12/12

✅ defaults

Metric Status Value SLO % Under SLO
execution_time 2.346µs < 10.000µs +76.5%
max_rss_usage 28.705MB < 31.000MB +7.4%

✅ high_rate_limit

Metric Status Value SLO % Under SLO
execution_time 2.420µs < 10.000µs +75.8%
max_rss_usage 28.685MB < 31.000MB +7.5%

✅ long_window

Metric Status Value SLO % Under SLO
execution_time 2.351µs < 10.000µs +76.5%
max_rss_usage 28.686MB < 31.000MB +7.5%

✅ low_rate_limit

Metric Status Value SLO % Under SLO
execution_time 2.362µs < 10.000µs +76.4%
max_rss_usage 28.685MB < 31.000MB +7.5%

✅ no_rate_limit

Metric Status Value SLO % Under SLO
execution_time 829.780ns < 10.000µs +91.7%
max_rss_usage 28.685MB < 31.000MB +7.5%

✅ short_window

Metric Status Value SLO % Under SLO
execution_time 2.487µs < 10.000µs +75.1%
max_rss_usage 28.705MB < 31.000MB +7.4%
recursivecomputation - 8/8

✅ deep

Metric Status Value SLO % Under SLO
execution_time 309.128ms < 320.950ms +3.7%
max_rss_usage 30.022MB < 31.000MB +3.2%

✅ deep-profiled

Metric Status Value SLO % Under SLO
execution_time 345.433ms < 359.150ms +3.8%
max_rss_usage 34.564MB < 35.500MB +2.6%

✅ medium

Metric Status Value SLO % Under SLO
execution_time 7.016ms < 7.400ms +5.2%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ shallow

Metric Status Value SLO % Under SLO
execution_time 946.002µs < 1.050ms +9.9%
max_rss_usage 29.098MB < 31.000MB +6.1%
samplingrules - 8/8

✅ average_match

Metric Status Value SLO % Under SLO
execution_time 332.903µs < 350.000µs +4.9%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ high_match

Metric Status Value SLO % Under SLO
execution_time 501.434µs < 550.000µs +8.8%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ low_match

Metric Status Value SLO % Under SLO
execution_time 170.279µs < 190.000µs +10.4%
max_rss_usage 431.419MB < 432.500MB +0.2%

✅ very_low_match

Metric Status Value SLO % Under SLO
execution_time 8.590ms < 9.150ms +6.1%
max_rss_usage 54.904MB < 55.000MB +0.2%
sethttpmeta - 32/32

✅ all-disabled

Metric Status Value SLO % Under SLO
execution_time 12.114µs < 20.000µs +39.4%
max_rss_usage 29.550MB < 31.000MB +4.7%

✅ all-enabled

Metric Status Value SLO % Under SLO
execution_time 42.385µs < 50.000µs +15.2%
max_rss_usage 29.550MB < 31.000MB +4.7%

✅ collectipvariant_exists

Metric Status Value SLO % Under SLO
execution_time 42.678µs < 50.000µs +14.6%
max_rss_usage 29.570MB < 31.000MB +4.6%

✅ no-collectipvariant

Metric Status Value SLO % Under SLO
execution_time 42.080µs < 50.000µs +15.8%
max_rss_usage 29.531MB < 31.000MB +4.7%

✅ no-useragentvariant

Metric Status Value SLO % Under SLO
execution_time 41.459µs < 50.000µs +17.1%
max_rss_usage 29.550MB < 31.000MB +4.7%

✅ obfuscation-no-query

Metric Status Value SLO % Under SLO
execution_time 42.529µs < 50.000µs +14.9%
max_rss_usage 29.610MB < 31.000MB +4.5%

✅ obfuscation-regular-case-explicit-query

Metric Status Value SLO % Under SLO
execution_time 79.022µs < 90.000µs +12.2%
max_rss_usage 29.924MB < 31.000MB +3.5%

✅ obfuscation-regular-case-implicit-query

Metric Status Value SLO % Under SLO
execution_time 79.888µs < 90.000µs +11.2%
max_rss_usage 30.003MB < 31.000MB +3.2%

✅ obfuscation-send-querystring-disabled

Metric Status Value SLO % Under SLO
execution_time 157.447µs < 170.000µs +7.4%
max_rss_usage 29.944MB < 31.000MB +3.4%

✅ obfuscation-worst-case-explicit-query

Metric Status Value SLO % Under SLO
execution_time 151.418µs < 160.000µs +5.4%
max_rss_usage 29.924MB < 31.000MB +3.5%

✅ obfuscation-worst-case-implicit-query

Metric Status Value SLO % Under SLO
execution_time 157.755µs < 170.000µs +7.2%
max_rss_usage 29.963MB < 31.000MB +3.3%

✅ useragentvariant_exists_1

Metric Status Value SLO % Under SLO
execution_time 41.660µs < 50.000µs +16.7%
max_rss_usage 29.531MB < 31.000MB +4.7%

✅ useragentvariant_exists_2

Metric Status Value SLO % Under SLO
execution_time 42.629µs < 50.000µs +14.7%
max_rss_usage 29.610MB < 31.000MB +4.5%

✅ useragentvariant_exists_3

Metric Status Value SLO % Under SLO
execution_time 41.990µs < 50.000µs +16.0%
max_rss_usage 29.531MB < 31.000MB +4.7%

✅ useragentvariant_not_exists_1

Metric Status Value SLO % Under SLO
execution_time 41.605µs < 50.000µs +16.8%
max_rss_usage 29.570MB < 31.000MB +4.6%

✅ useragentvariant_not_exists_2

Metric Status Value SLO % Under SLO
execution_time 41.370µs < 50.000µs +17.3%
max_rss_usage 29.531MB < 31.000MB +4.7%
span - 26/26

✅ add-event

Metric Status Value SLO % Under SLO
execution_time 23.039ms < 26.200ms +12.1%
max_rss_usage 48.442MB < 49.000MB +1.1%

✅ add-metrics

Metric Status Value SLO % Under SLO
execution_time 89.539ms < 98.350ms +9.0%
max_rss_usage 615.023MB < 961.000MB +36.0%

✅ add-tags

Metric Status Value SLO % Under SLO
execution_time 148.707ms < 168.550ms +11.8%
max_rss_usage 615.227MB < 962.500MB +36.1%

✅ get-context

Metric Status Value SLO % Under SLO
execution_time 21.759ms < 23.700ms +8.2%
max_rss_usage 47.285MB < 47.500MB +0.5%

✅ is-recording

Metric Status Value SLO % Under SLO
execution_time 21.591ms < 23.900ms +9.7%
max_rss_usage 47.303MB < 47.500MB +0.4%

✅ record-exception

Metric Status Value SLO % Under SLO
execution_time 41.239ms < 44.500ms +7.3%
max_rss_usage 40.318MB < 40.500MB +0.4%

✅ set-status

Metric Status Value SLO % Under SLO
execution_time 23.206ms < 26.000ms +10.7%
max_rss_usage 47.307MB < 47.500MB +0.4%

✅ start

Metric Status Value SLO % Under SLO
execution_time 21.372ms < 23.500ms +9.1%
max_rss_usage 47.303MB < 47.500MB +0.4%

✅ start-finish

Metric Status Value SLO % Under SLO
execution_time 49.831ms < 52.500ms +5.1%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ start-finish-telemetry

Metric Status Value SLO % Under SLO
execution_time 51.299ms < 55.300ms +7.2%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ start-finish-traceid128

Metric Status Value SLO % Under SLO
execution_time 53.293ms < 56.050ms +4.9%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ start-traceid128

Metric Status Value SLO % Under SLO
execution_time 21.446ms < 24.600ms +12.8%
max_rss_usage 47.317MB < 47.500MB +0.4%

✅ update-name

Metric Status Value SLO % Under SLO
execution_time 21.907ms < 24.100ms +9.1%
max_rss_usage 47.824MB < 48.000MB +0.4%
telemetryaddmetric - 30/30

✅ 1-count-metric-1-times

Metric Status Value SLO % Under SLO
execution_time 3.240µs < 10.000µs +67.6%
max_rss_usage 29.059MB < 31.000MB +6.3%

✅ 1-count-metrics-100-times

Metric Status Value SLO % Under SLO
execution_time 215.413µs < 240.000µs +10.2%
max_rss_usage 29.117MB < 31.000MB +6.1%

✅ 1-distribution-metric-1-times

Metric Status Value SLO % Under SLO
execution_time 3.112µs < 10.000µs +68.9%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ 1-distribution-metrics-100-times

Metric Status Value SLO % Under SLO
execution_time 194.224µs < 210.000µs +7.5%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ 1-gauge-metric-1-times

Metric Status Value SLO % Under SLO
execution_time 2.105µs < 10.000µs +79.0%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ 1-gauge-metrics-100-times

Metric Status Value SLO % Under SLO
execution_time 124.638µs < 140.000µs +11.0%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ 1-rate-metric-1-times

Metric Status Value SLO % Under SLO
execution_time 3.173µs < 10.000µs +68.3%
max_rss_usage 29.059MB < 31.000MB +6.3%

✅ 1-rate-metrics-100-times

Metric Status Value SLO % Under SLO
execution_time 213.034µs < 230.000µs +7.4%
max_rss_usage 29.059MB < 31.000MB +6.3%

✅ 100-count-metrics-100-times

Metric Status Value SLO % Under SLO
execution_time 21.289ms < 22.500ms +5.4%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ 100-distribution-metrics-100-times

Metric Status Value SLO % Under SLO
execution_time 1.990ms < 2.100ms +5.2%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ 100-gauge-metrics-100-times

Metric Status Value SLO % Under SLO
execution_time 1.295ms < 1.400ms +7.5%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ 100-rate-metrics-100-times

Metric Status Value SLO % Under SLO
execution_time 2.179ms < 2.400ms +9.2%
max_rss_usage 29.078MB < 31.000MB +6.2%

✅ flush-1-metric

Metric Status Value SLO % Under SLO
execution_time 4.239µs < 10.000µs +57.6%
max_rss_usage 29.059MB < 31.000MB +6.3%

✅ flush-100-metrics

Metric Status Value SLO % Under SLO
execution_time 181.537µs < 200.000µs +9.2%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ flush-1000-metrics

Metric Status Value SLO % Under SLO
execution_time 2.194ms < 2.350ms +6.6%
max_rss_usage 30.239MB < 31.000MB +2.5%
tracer - 6/6

✅ large

Metric Status Value SLO % Under SLO
execution_time 29.620ms < 32.950ms +10.1%
max_rss_usage 30.278MB < 31.000MB +2.3%

✅ medium

Metric Status Value SLO % Under SLO
execution_time 2.912ms < 3.200ms +9.0%
max_rss_usage 29.098MB < 31.000MB +6.1%

✅ small

Metric Status Value SLO % Under SLO
execution_time 329.172µs < 370.000µs +11.0%
max_rss_usage 29.098MB < 31.000MB +6.1%

@vitor-de-araujo vitor-de-araujo merged commit 590accb into main Jul 23, 2025
885 checks passed
@vitor-de-araujo vitor-de-araujo deleted the vitor-de-araujo/APMS-16576/the-zombie-logger branch July 23, 2025 20:01
alyshawang pushed a commit that referenced this pull request Jul 25, 2025
…14121)

When pytest is run with log capture on (which is the default, unless
`-s` or similar is used), it replaces `sys.stdout` and `sys.stderr` with
temporary file descriptors that are closed at the end of the test
session. If a custom logger is created referencing one of those streams,
any logs emitted after the end of the test session will try to write to
the closed file descriptor, leading to an ` I/O operation on closed
file` error. See #12018 for example cases.

Annoyingly, this happens even if ddtrace is not explicitly enabled in
pytest with `--ddtrace`, because before we even have the opportunity to
parse command line arguments, `ddtrace/__init__.py` will load, which
sets up a bunch of things, including loggers.

At the beginning of a pytest session, we call a
`take_over_logger_stream_handler()` function which sets up the `ddtrace`
logger specifically for test runs. This PR:
- Changes `take_over_logger_stream_handler()` to not propagate logs from
the `ddtrace` handler to the root handler. This means the `ddtrace`
handler will not be affected by custom loggers by default.

- Makes `take_over_logger_stream_handler()` run even if `--ddtrace` is
not enabled. This is not the ideal solution in the sky: ideally we would
not enable ddtrace features at all when `--ddtrace` is not activated,
however this is a bigger change to the way ddtrace works at the moment,
so this PR focuses on avoiding the logging issue.

Finally, this change makes the current tests that use `caplog` to check
for logs emitted by `ddtrace` to break, because `caplog` depends on the
logs being propagated to the root logger to capture them, so this PR
adds a wrapping `caplog` fixture in our `conftest.py` that re-enables
log propagation for those tests. (The alternative would be changing
every `caplog.at_level(lvl)` call in our tests to `caplog.at_level(lvl,
"ddtrace")`, but there are _a lot_ of them.)

## 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))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
vitor-de-araujo added a commit that referenced this pull request Jul 28, 2025
…sages (#14151)

With PR #14121, we stopped propagating logs to the root logger, so the
root logging level is not used by Test Optimization messages anymore; we
need to explicitly set the log level for the ddtrace logger as well.

## 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))

## Reviewer Checklist
- [ ] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants