Add redis client only instrumentation (#3143)

* Rough draft of the contribution

* Add connection instrumentation based on the existing pattern.

add a helper function assert_span_count to simplify tests
add unit tests for pipeline hooks

* fix tests to use fake redis

* replace the redis version checks with defines

* Adjust comment and fix one test

* Update documentation with the client method

* Update the changelog

* Update the HTTPX readme to point to proper class method

* Add back the assert_span_count method

* Move the changelog update to the unreleased section

* Remove extra whitespace in the Changelog

* Fix linter complaints

* Remove hasattr assert

* Move the Changelog to Unreleased

* Review comments. Move types to types.py, move some functions to util.py. Tested and verified docs.

* Fix type compatibility

* fix typing and lint

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
This commit is contained in:
Oleg
2025-05-09 05:13:46 -04:00
committed by GitHub
parent cc7169cf2c
commit 2c0033f842
8 changed files with 729 additions and 229 deletions

View File

@ -122,6 +122,7 @@ intersphinx_mapping = {
"https://opentelemetry-python.readthedocs.io/en/latest/",
None,
),
"redis": ("https://redis-py.readthedocs.io/en/latest/", None),
}
# http://www.sphinx-doc.org/en/master/config.html#confval-nitpicky