Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ READONLY
RediSearch
RedisBloom
RedisGraph
RedisInstrumentor
RedisJSON
RedisTimeSeries
SHA
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/opentelemetry/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import uptrace
import valkey
from opentelemetry import trace
from opentelemetry.instrumentation.valkey import ValkeyInstrumentor
from opentelemetry.instrumentation.redis import RedisInstrumentor

tracer = trace.get_tracer("app_or_package_name", "1.0.0")

Expand All @@ -16,7 +16,7 @@ def main():
service_name="myservice",
service_version="1.0.0",
)
ValkeyInstrumentor().instrument()
RedisInstrumentor().instrument()

client = valkey.StrictValkey(host="localhost", port=6379)

Expand Down
14 changes: 7 additions & 7 deletions docs/opentelemetry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ To install OpenTelemetry `instrumentation <https://opentelemetry-python-contrib.

.. code-block:: shell

pip install opentelemetry-instrumentation-valkey
pip install opentelemetry-instrumentation-redis

You can then use it to instrument code like this:

.. code-block:: python

from opentelemetry.instrumentation.valkey import ValkeyInstrumentor
from opentelemetry.instrumentation.redis import RedisInstrumentor

ValkeyInstrumentor().instrument()
RedisInstrumentor().instrument()

Once the code is patched, you can use valkey-py as usually:

Expand Down Expand Up @@ -99,9 +99,9 @@ Uptrace

Uptrace is an `open source APM <https://uptrace.dev/get/open-source-apm.html>`_ that supports distributed tracing, metrics, and logs. You can use it to monitor applications and set up automatic alerts to receive notifications via email, Slack, Telegram, and more.

You can use Uptrace to monitor valkey-py using this `GitHub example <https://github.com/valkey/valkey-py/tree/master/docs/examples/opentelemetry>`_ as a starting point.
You can use Uptrace to monitor valkey-py using this `GitHub example <https://github.com/valkey-io/valkey-py/tree/main/docs/examples/opentelemetry>`_ as a starting point.

.. image:: images/opentelemetry/valkey-py-trace.png
.. image:: images/opentelemetry/redis-py-trace.png
:alt: Valkey-py trace

You can `install Uptrace <https://uptrace.dev/get/install.html>`_ by downloading a DEB/RPM package or a pre-compiled binary.
Expand All @@ -113,9 +113,9 @@ In addition to monitoring valkey-py client, you can also monitor Valkey Server p

OpenTelemetry Collector is a proxy/middleman between your application and a `distributed tracing tool <https://uptrace.dev/blog/distributed-tracing-tools.html>`_ such as Uptrace or Jaeger. Collector receives telemetry data, processes it, and then exports the data to APM tools that can store it permanently.

For example, you can use the `OpenTelemetry Valkey receiver <https://uptrace.dev/get/monitor/opentelemetry-valkey.html>` provided by Otel Collector to monitor Valkey performance:
For example, you can use the `OpenTelemetry Redis receiver <https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/redisreceiver>`_ provided by Otel Collector to monitor Valkey performance:

.. image:: images/opentelemetry/valkey-metrics.png
.. image:: images/opentelemetry/redis-metrics.png
:alt: Valkey metrics

See introduction to `OpenTelemetry Collector <https://uptrace.dev/opentelemetry/collector.html>`_ for details.
Expand Down