From 025c0207a2ebbe2f2da0dfc029e21453ff373613 Mon Sep 17 00:00:00 2001 From: Quinna Halim Date: Fri, 23 Aug 2024 16:55:42 -0400 Subject: [PATCH] chore: deprecate yaaredis integration (#10281) Add deprecation warning to yaaredis, as the yaaredis library [was deprecated. ](https://github.com/talkiq/yaaredis?tab=readme-ov-file#this-library-is-deprecated) ## 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](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) --- ddtrace/contrib/internal/yaaredis/patch.py | 9 +++++++++ .../notes/deprecate-yaaredis-fe7ec032b017778d.yaml | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/deprecate-yaaredis-fe7ec032b017778d.yaml diff --git a/ddtrace/contrib/internal/yaaredis/patch.py b/ddtrace/contrib/internal/yaaredis/patch.py index e461f673603..eeba29994f6 100644 --- a/ddtrace/contrib/internal/yaaredis/patch.py +++ b/ddtrace/contrib/internal/yaaredis/patch.py @@ -8,11 +8,13 @@ from ddtrace._trace.utils_redis import _instrument_redis_execute_pipeline from ddtrace.contrib.redis_utils import _run_redis_command_async from ddtrace.internal.schema import schematize_service_name +from ddtrace.internal.utils.deprecations import DDTraceDeprecationWarning from ddtrace.internal.utils.formats import CMD_MAX_LEN from ddtrace.internal.utils.formats import asbool from ddtrace.internal.utils.formats import stringify_cache_args from ddtrace.internal.utils.wrappers import unwrap from ddtrace.pin import Pin +from ddtrace.vendor.debtcollector import deprecate config._add( @@ -32,6 +34,13 @@ def get_version(): def patch(): """Patch the instrumented methods""" + deprecate( + prefix="The yaaredis module is deprecated.", + message="The yaaredis module is deprecated and will be deleted.", + category=DDTraceDeprecationWarning, + removal_version="3.0.0", + ) + if getattr(yaaredis, "_datadog_patch", False): return yaaredis._datadog_patch = True diff --git a/releasenotes/notes/deprecate-yaaredis-fe7ec032b017778d.yaml b/releasenotes/notes/deprecate-yaaredis-fe7ec032b017778d.yaml new file mode 100644 index 00000000000..f389d16dc33 --- /dev/null +++ b/releasenotes/notes/deprecate-yaaredis-fe7ec032b017778d.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + yaaredis: The yaaredis integration is deprecated and will be removed in a future version. + As an alternative to the yaaredis integration, the redis integration should be used. \ No newline at end of file