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

docs(tracing): remove patch_all from basic usage docs #11868

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

Conversation

mabdinur
Copy link
Contributor

@mabdinur mabdinur commented Jan 6, 2025

Resolves: #11865

  • Removes documentation for ddtrace.patch_all(...) from basic usage. We should encourage the use of ddtrace.auto instead.
  • For fine grained control over enabling/disabling integrations DD_PATCH_MODULES and DD_TRACE_<Integration>_ENABLED should be used.

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

@mabdinur mabdinur requested a review from a team as a code owner January 6, 2025 23:17
@mabdinur mabdinur requested a review from gnufede January 6, 2025 23:17
Copy link
Contributor

github-actions bot commented Jan 6, 2025

CODEOWNERS have been resolved as:

docs/basic_usage.rst                                                    @DataDog/python-guild

@mabdinur mabdinur force-pushed the munir/improve-docs-for-ddtrace-auto branch from 6f76469 to 5dfc056 Compare January 6, 2025 23:18
@mabdinur mabdinur changed the title Munir/improve docs for ddtrace auto docs(tracing): remove patch_all from basic usage docs Jan 6, 2025
@datadog-dd-trace-py-rkomorn
Copy link

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

Datadog Report

Branch report: munir/improve-docs-for-ddtrace-auto
Commit report: 754a612
Test service: dd-trace-py

✅ 0 Failed, 87 Passed, 1468 Skipped, 4m 12.61s Total duration (35m 18.45s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Jan 6, 2025

Benchmarks

Benchmark execution time: 2025-01-07 16:38:19

Comparing candidate commit 754a612 in PR branch munir/improve-docs-for-ddtrace-auto with baseline commit 81208cd in branch main.

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

docs/basic_usage.rst Outdated Show resolved Hide resolved
@brettlangdon brettlangdon requested a review from wantsui January 7, 2025 13:05
@wantsui wantsui requested a review from quinna-h January 7, 2025 13:58
@wantsui
Copy link
Collaborator

wantsui commented Jan 7, 2025

If the goal of this update is to encourage ddtrace.auto usage, the installation quickstart page currently shows an example of patch_all() too.

:py:func:`ddtrace.patch_all` can be used to configure the tracer::
from ddtrace import config, patch_all
config.env = "dev" # the environment the application is in
config.service = "app" # name of your application
config.version = "0.1" # version of your application
patch_all()

Co-authored-by: Gabriele N. Tornetta <[email protected]>
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.

[BUG]: Document more differences between ddtrace.auto and patch_all
3 participants