Skip to content

Add redis client only instrumentation #3143

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

Merged
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2c291bf
Rough draft of the contribution
OlegZv Dec 22, 2024
c33f2b5
Add connection instrumentation based on the existing pattern.
OlegZv Nov 27, 2024
1f99507
fix tests to use fake redis
OlegZv Dec 22, 2024
edca781
replace the redis version checks with defines
OlegZv Dec 22, 2024
be3ca10
Adjust comment and fix one test
OlegZv Dec 22, 2024
0918232
Update documentation with the client method
OlegZv Dec 22, 2024
843e708
Update the changelog
OlegZv Dec 22, 2024
c169b85
Update the HTTPX readme to point to proper class method
OlegZv Dec 22, 2024
a94d8ec
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Feb 4, 2025
3a9f1d1
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Feb 8, 2025
06eb8c5
Add back the assert_span_count method
OlegZv Feb 12, 2025
de415e2
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Feb 12, 2025
1ababf2
Move the changelog update to the unreleased section
OlegZv Feb 13, 2025
74395a8
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Feb 13, 2025
04adec4
Remove extra whitespace in the Changelog
OlegZv Feb 13, 2025
31a8b4b
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Feb 14, 2025
cf134ea
Fix linter complaints
OlegZv Feb 18, 2025
3f8ca64
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Feb 18, 2025
2d901c9
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Feb 20, 2025
cf88331
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Feb 27, 2025
533b8a1
Remove hasattr assert
OlegZv Mar 2, 2025
0fa915b
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Mar 2, 2025
9032990
Merge branch 'main' into add_redis_client_only_instrumentation
xrmx Apr 11, 2025
86c34cd
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Apr 12, 2025
20b9bc8
Move the Changelog to Unreleased
OlegZv Apr 12, 2025
69ca5cf
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Apr 29, 2025
4c1d7e3
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv Apr 30, 2025
d2c4fb7
Merge branch 'main' into add_redis_client_only_instrumentation
OlegZv May 2, 2025
586a87a
Review comments. Move types to types.py, move some functions to util.…
OlegZv May 2, 2025
9b77998
Fix type compatibility
OlegZv May 6, 2025
5734cd0
Merge branch 'main' into add_redis_client_only_instrumentation
xrmx May 7, 2025
0ee8358
Merge branch 'main' into add_redis_client_only_instrumentation
emdneto May 7, 2025
0abbaee
fix typing and lint
OlegZv May 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `opentelemetry-instrumentation-redis` Add support for redis client-specific instrumentation.
([#3143](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3143))

### Fixed

- `opentelemetry-instrumentation` Catch `ModuleNotFoundError` when the library is not installed
Expand All @@ -31,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `opentelemetry-instrumentation-botocore` Capture server attributes for botocore API calls
([#3448](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3448))


## Version 1.32.0/0.53b0 (2025-04-10)

### Added
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"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
Expand Down
9 changes: 6 additions & 3 deletions docs/instrumentation/redis/redis.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
OpenTelemetry Redis Instrumentation
===================================
.. include:: ../../../instrumentation/opentelemetry-instrumentation-redis/README.rst
:end-before: References

Usage
-----

.. automodule:: opentelemetry.instrumentation.redis
:members:
:undoc-members:
:show-inheritance:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Instrumenting single clients
****************************

If you only want to instrument requests for specific client instances, you can
use the `instrument_client` method.
use the `HTTPXClientInstrumentor.instrument_client` method.


.. code-block:: python
Expand Down
Loading