Skip to content

Commit e9104ed

Browse files
author
Mikhail Koviazin
authored
Merge pull request #203 from valkey-io/mkmkme/documentation-opentelemetry-fix
docs: fix OpenTelemetry documentation
2 parents 4f81c56 + cae1f87 commit e9104ed

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.github/wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ READONLY
3838
RediSearch
3939
RedisBloom
4040
RedisGraph
41+
RedisInstrumentor
4142
RedisJSON
4243
RedisTimeSeries
4344
SHA

docs/examples/opentelemetry/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import uptrace
66
import valkey
77
from opentelemetry import trace
8-
from opentelemetry.instrumentation.valkey import ValkeyInstrumentor
8+
from opentelemetry.instrumentation.redis import RedisInstrumentor
99

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

@@ -16,7 +16,7 @@ def main():
1616
service_name="myservice",
1717
service_version="1.0.0",
1818
)
19-
ValkeyInstrumentor().instrument()
19+
RedisInstrumentor().instrument()
2020

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

docs/opentelemetry.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ To install OpenTelemetry `instrumentation <https://opentelemetry-python-contrib.
3636

3737
.. code-block:: shell
3838
39-
pip install opentelemetry-instrumentation-valkey
39+
pip install opentelemetry-instrumentation-redis
4040
4141
You can then use it to instrument code like this:
4242

4343
.. code-block:: python
4444
45-
from opentelemetry.instrumentation.valkey import ValkeyInstrumentor
45+
from opentelemetry.instrumentation.redis import RedisInstrumentor
4646
47-
ValkeyInstrumentor().instrument()
47+
RedisInstrumentor().instrument()
4848
4949
Once the code is patched, you can use valkey-py as usually:
5050

@@ -99,9 +99,9 @@ Uptrace
9999

100100
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.
101101

102-
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.
102+
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.
103103

104-
.. image:: images/opentelemetry/valkey-py-trace.png
104+
.. image:: images/opentelemetry/redis-py-trace.png
105105
:alt: Valkey-py trace
106106

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

114114
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.
115115

116-
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:
116+
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:
117117

118-
.. image:: images/opentelemetry/valkey-metrics.png
118+
.. image:: images/opentelemetry/redis-metrics.png
119119
:alt: Valkey metrics
120120

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

0 commit comments

Comments
 (0)