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(tracing): refactor web server integrations to use the core module #12035

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

Conversation

wconti27
Copy link
Contributor

@wconti27 wconti27 commented Jan 22, 2025

Motivation

Refactors all web server integrations still using tracer.trace to instead use core.context_with_data. This is in preparation for supporting AWS API Gateway to ensure all web servers share the same code path.

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 Jan 22, 2025

CODEOWNERS have been resolved as:

ddtrace/_trace/trace_handlers.py                                        @DataDog/apm-sdk-api-python
ddtrace/contrib/internal/aiohttp/middlewares.py                         @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/bottle/trace.py                                @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/cherrypy/middleware.py                         @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/falcon/middleware.py                           @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/molten/patch.py                                @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/pyramid/trace.py                               @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/sanic/patch.py                                 @DataDog/apm-core-python @DataDog/apm-idm-python
tests/snapshots/tests.contrib.cherrypy.test_middleware.test_child.json  @DataDog/apm-python
tests/snapshots/tests.contrib.cherrypy.test_middleware.test_error.json  @DataDog/apm-python
tests/snapshots/tests.contrib.cherrypy.test_middleware.test_fatal.json  @DataDog/apm-python
tests/snapshots/tests.contrib.cherrypy.test_middleware.test_success.json  @DataDog/apm-python
tests/snapshots/tests.contrib.sanic.test_sanic_server.test_multiple_requests_sanic_http.json  @DataDog/apm-python
tests/snapshots/tests.contrib.sanic.test_sanic_server.test_multiple_requests_sanic_http_pre_21.9.json  @DataDog/apm-python
tests/snapshots/tests.contrib.sanic.test_sanic_server.test_sanic_errors.json  @DataDog/apm-python
tests/snapshots/tests.contrib.sanic.test_sanic_server.test_sanic_errors_pre_21.9.json  @DataDog/apm-python

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

datadog-dd-trace-py-rkomorn bot commented Jan 22, 2025

Datadog Report

Branch report: conti/standardize-web-frameworks-to-use-core
Commit report: d4eb587
Test service: dd-trace-py

✅ 0 Failed, 130 Passed, 1468 Skipped, 4m 24.55s Total duration (35m 36.75s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Jan 22, 2025

Benchmarks

Benchmark execution time: 2025-01-24 21:36:23

Comparing candidate commit ee226aa in PR branch conti/standardize-web-frameworks-to-use-core with baseline commit 3167f00 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 394 metrics, 2 unstable metrics.

@wconti27 wconti27 changed the title initial refactoring tracing: refactor web server integrations to use the core module Jan 23, 2025
@wconti27 wconti27 self-assigned this Jan 23, 2025
@wconti27 wconti27 added the changelog/no-changelog A changelog entry is not required for this PR. label Jan 23, 2025
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Jan 23, 2025

Datadog Report

Branch report: conti/standardize-web-frameworks-to-use-core
Commit report: ee226aa
Test service: dd-trace-py

✅ 0 Failed, 130 Passed, 1468 Skipped, 4m 43.79s Total duration (36m 29.77s time saved)

@wconti27 wconti27 changed the title tracing: refactor web server integrations to use the core module chore(tracing): refactor web server integrations to use the core module Jan 23, 2025
@wconti27 wconti27 marked this pull request as ready for review January 23, 2025 15:12
@wconti27 wconti27 requested review from a team as code owners January 23, 2025 15:12
@emmettbutler emmettbutler self-requested a review January 23, 2025 15:30
Copy link
Collaborator

@wantsui wantsui left a comment

Choose a reason for hiding this comment

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

👏 👏 👏 👏

Copy link
Contributor

@mabdinur mabdinur left a comment

Choose a reason for hiding this comment

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

Left some suggestions/nits but overall I love this change. Thanks for doing this clean up.

@wconti27
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jan 24, 2025

Devflow running: /merge

View all feedbacks in Devflow UI.


2025-01-24 18:15:30 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-01-24 22:16:07 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time

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. mergequeue-status: removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants