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): use importlib metadata to infer flask version as the old method is deprecated #8809

Merged

Conversation

christophe-papazian
Copy link
Contributor

@christophe-papazian christophe-papazian commented Mar 29, 2024

Change the method we use to infer Flask version, as the current method is deprecated (remove associate warnings from Flask framework).
This PR will ensure the Flask support in the tracer won't break with next Flask 3.1 release.

Checklist

  • Change(s) are motivated and described in the PR description
  • Testing strategy is described if automated tests are not included in the PR
  • Risks are described (performance impact, potential for breakage, maintainability)
  • Change is maintainable (easy to change, telemetry, documentation)
  • Library release note guidelines are followed or label changelog/no-changelog is set
  • Documentation is included (in-code, generated user docs, public corp docs)
  • Backport labels are set (if applicable)
  • If this PR changes the public interface, I've notified @DataDog/apm-tees.
  • If change touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.

Reviewer Checklist

  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Description motivates each change
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Change is maintainable (easy to change, telemetry, documentation)
  • Release note makes sense to a user of the library
  • 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 the changelog/no-changelog A changelog entry is not required for this PR. label Mar 29, 2024
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Mar 29, 2024

Datadog Report

Branch report: christophe-papazian/flask_version_remove_deprecation
Commit report: 35d0e8e
Test service: dd-trace-py

✅ 0 Failed, 144386 Passed, 28030 Skipped, 9h 27m 7.09s Total duration (2h 40m 1.74s time saved)

@christophe-papazian christophe-papazian marked this pull request as ready for review March 29, 2024 16:10
@christophe-papazian christophe-papazian enabled auto-merge (squash) March 29, 2024 16:15
ddtrace/contrib/flask/patch.py Outdated Show resolved Hide resolved
ddtrace/internal/packages.py Outdated Show resolved Hide resolved
@pr-commenter
Copy link

pr-commenter bot commented Mar 29, 2024

Benchmarks

Benchmark execution time: 2024-04-02 10:31:07

Comparing candidate commit 35d0e8e in PR branch christophe-papazian/flask_version_remove_deprecation with baseline commit 2ac11e5 in branch main.

Found 1 performance improvements and 2 performance regressions! Performance is the same for 198 metrics, 9 unstable metrics.

scenario:httppropagationextract-b3_headers

  • 🟥 max_rss_usage [+592.928KB; +746.055KB] or [+2.804%; +3.529%]

scenario:httppropagationextract-invalid_priority_header

  • 🟥 max_rss_usage [+704.096KB; +953.964KB] or [+3.345%; +4.532%]

scenario:httppropagationextract-none_propagation_style

  • 🟩 max_rss_usage [-765.182KB; -682.754KB] or [-3.499%; -3.122%]

@christophe-papazian christophe-papazian merged commit b2a4fb1 into main Apr 2, 2024
178 of 180 checks passed
@christophe-papazian christophe-papazian deleted the christophe-papazian/flask_version_remove_deprecation branch April 2, 2024 10:47
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants