Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tracer): core additions #10716

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

christophe-papazian
Copy link
Contributor

@christophe-papazian christophe-papazian commented Sep 19, 2024

Small core additions:

  • get_root to get the root context
  • discard_item to discard items
  • remove traverse optional argument of get_item and split the method and function in two version, get_item and get_local_item for efficiency reasons.
  • use modern type annotations
  • set _CURRENT_CONTEXT directly (without using an ephemeral None value that breaks type checking)
  • add asyncio test for all of that with concurrent threads

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

@christophe-papazian christophe-papazian added enhancement changelog/no-changelog A changelog entry is not required for this PR. labels Sep 19, 2024
Copy link
Contributor

github-actions bot commented Sep 19, 2024

CODEOWNERS have been resolved as:

ddtrace/_trace/trace_handlers.py                                        @DataDog/apm-sdk-api-python
ddtrace/appsec/_iast/processor.py                                       @DataDog/asm-python
ddtrace/internal/core/__init__.py                                       @DataDog/apm-core-python
tests/internal/test_context_events_api.py                               @DataDog/apm-core-python

@pr-commenter
Copy link

pr-commenter bot commented Sep 19, 2024

Benchmarks

Benchmark execution time: 2024-09-20 15:23:13

Comparing candidate commit bc44c35 in PR branch christophe-papazian/core_additions with baseline commit baac738 in branch main.

Found 1 performance improvements and 0 performance regressions! Performance is the same for 295 metrics, 48 unstable metrics.

scenario:iast_aspects-aspect_iast_do_index_on_dict

  • 🟩 max_rss_usage [-2.597MB; -2.254MB] or [-8.744%; -7.590%]

@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Sep 19, 2024

Datadog Report

Branch report: christophe-papazian/core_additions
Commit report: bc44c35
Test service: dd-trace-py

✅ 0 Failed, 592 Passed, 694 Skipped, 19m 24.51s Total duration (17m 58.39s time saved)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR. enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant