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

feat: add valkey instrumentation support #12060

Open
wants to merge 2 commits into
base: 3.x-staging
Choose a base branch
from

Conversation

ZStriker19
Copy link
Contributor

@ZStriker19 ZStriker19 commented Jan 23, 2025

This PR is the work of AhmadMasry

Moving from #12003 since we have issues running certain tests on forked repos.

The Valkey instrumentation is based on the current implementation of the Redis instrumentation, but keeping into consideration that the two projects may deviate and lose compatibility, the Valkey instrumentation is created as a separated module.

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 23, 2025

CODEOWNERS have been resolved as:

.riot/requirements/11ac941.txt                                          @DataDog/apm-python
.riot/requirements/1e98e9b.txt                                          @DataDog/apm-python
.riot/requirements/4aa2a2a.txt                                          @DataDog/apm-python
.riot/requirements/7219cf4.txt                                          @DataDog/apm-python
.riot/requirements/b96b665.txt                                          @DataDog/apm-python
.riot/requirements/dd68acc.txt                                          @DataDog/apm-python
ddtrace/_trace/utils_valkey.py                                          @DataDog/apm-sdk-api-python
ddtrace/contrib/internal/valkey/asyncio_patch.py                        @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/valkey/patch.py                                @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/valkey_utils.py                                @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/valkey/__init__.py                                      @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/ext/valkey.py                                                   @DataDog/apm-core-python @DataDog/apm-idm-python
releasenotes/notes/add-valkey-support-6cc9f41351dc0cd9.yaml             @DataDog/apm-python
tests/contrib/valkey/__init__.py                                        @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/valkey/test_valkey.py                                     @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/valkey/test_valkey_asyncio.py                             @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/valkey/test_valkey_cluster.py                             @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/valkey/test_valkey_cluster_asyncio.py                     @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/valkey/test_valkey_patch.py                               @DataDog/apm-core-python @DataDog/apm-idm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_analytics_with_rate.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_analytics_without_rate.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_basics.json       @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_custom_cmd_length.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_custom_cmd_length_env.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_env_user_specified_valkey_service.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_full_command_in_resource_config.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_full_command_in_resource_env.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_long_command.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_meta_override.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_opentracing.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_pipeline_immediate.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_pipeline_traced.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_service_precedence.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_unicode.json      @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey.test_user_specified_service.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_basic_request.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_client_name.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_connection_error.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_decoding_non_utf8_args.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_decoding_non_utf8_pipeline_args.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_long_command.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_override_service_name.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_parenting.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_pin.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_pipeline_traced.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_pipeline_traced_context_manager_transaction.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_two_traced_pipelines.json  @DataDog/apm-python
tests/snapshots/tests.contrib.valkey.test_valkey_asyncio.test_unicode_request.json  @DataDog/apm-python
.github/COMMIT_TEMPLATE.txt                                             @DataDog/python-guild @DataDog/apm-core-python
.gitlab/services.yml                                                    @DataDog/python-guild @DataDog/apm-core-python
ddtrace/_monkey.py                                                      @DataDog/apm-core-python
ddtrace/_trace/trace_handlers.py                                        @DataDog/apm-sdk-api-python
ddtrace/ext/__init__.py                                                 @DataDog/apm-core-python @DataDog/apm-idm-python
docker-compose.yml                                                      @DataDog/apm-core-python
docs/index.rst                                                          @DataDog/python-guild
docs/integrations.rst                                                   @DataDog/python-guild
docs/spelling_wordlist.txt                                              @DataDog/python-guild
min_compatible_versions.csv                                             @DataDog/apm-core-python
riotfile.py                                                             @DataDog/apm-python
supported_versions_output.json                                          @DataDog/apm-core-python
supported_versions_table.csv                                            @DataDog/apm-core-python
tests/contrib/config.py                                                 @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/suitespec.yml                                             @DataDog/apm-core-python @DataDog/apm-idm-python

@ZStriker19 ZStriker19 marked this pull request as ready for review January 23, 2025 21:18
@ZStriker19 ZStriker19 requested review from a team as code owners January 23, 2025 21:18
@datadog-dd-trace-py-rkomorn
Copy link

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

Datadog Report

Branch report: main-AhmadMasry
Commit report: 6921d3e
Test service: dd-trace-py

✅ 0 Failed, 130 Passed, 1184 Skipped, 3m 37.55s Total duration (24m 50.51s time saved)

docs/integrations.rst Outdated Show resolved Hide resolved
@ZStriker19 ZStriker19 enabled auto-merge (squash) January 23, 2025 22:24
@pr-commenter
Copy link

pr-commenter bot commented Jan 23, 2025

Benchmarks

Benchmark execution time: 2025-02-04 19:26:17

Comparing candidate commit c006143 in PR branch main-AhmadMasry with baseline commit 3ac7025 in branch 3.x-staging.

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

@ZStriker19
Copy link
Contributor Author

Waiting on a pr for the valkey image to be approved so we can use it in testing. Should be approved shortly and then we can merge this.

Add support for Valkey instrumentation

Add valkeycluster service

Add release notes

Reformat snapshots

Apply suggested changes

remove ddtrace/contrib/valkey

update suitespec to reflect movement of files

fixes for moving internal

Update releasenotes/notes/add-valkey-support-6cc9f41351dc0cd9.yaml

Update docs/integrations.rst

fix builddocs with init file

use mirror image for testing

add valkeycluster to services

see if more open pattern fixes

switch from entrypoint to command for valkey cluster cont

add environment ip value to container

use rediscluster container for db
@ZStriker19 ZStriker19 requested review from a team as code owners February 3, 2025 20:53
@ZStriker19 ZStriker19 changed the base branch from main to 3.x-staging February 3, 2025 20:58
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.

5 participants