You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the redis asyncio clients (Redis, Pipeline etc) are not being traced correctly. Every trace is a tiny fragment of the actual time, occurring around the start time of the redis command being called.
I narrowed this down to the instrumentor for redis not wrapping the async variants as expected (it uses the same sync approach that it uses for the sync redis - and as a result the span only traces the coroutine creation, but not the coroutine actually being awaited).
The result is a very short trace (< 1ms) at the start of the redis call that doesn't actually show the full time of the redis command.
I have fixed this in a follow up PR, which I will put up shortly and link.
Describe your environment
Python version: 3.11
redis-py version: 4.5.5
opentelemetry-instrumentation-redis version: current master or 0.39b0
OS: Ubuntu
Steps to reproduce
Here is an example script, which calls an async redis command, and an async redis pipeline.
For each async call:
A parent span is started
asyncio.sleep for 50 milliseconds (to create a time delta between the parent span and the actual redis span for visual clarity)
call a redis command (debug-sleep) for 100 milliseconds
The data can then be visualised and the parent span compared to the redis-instrumentor generated span to see that the span doesn't encompass the full time of the command.
Below I have used jaeger to visualise the traces for ease of reading
What is the expected behavior?
Expecting to see 100 milliseconds of a redis command, wrapped by the 150 milliseconds parent span
(This is a screenshot from when I fix the code)
What is the actual behavior?
Actually seeing a really tiny redis command span (< 0.2ms) wrapped by the 150millisecond parent span
(This is a screenshot from the results of the example provided script)
The text was updated successfully, but these errors were encountered:
Currently the redis asyncio clients (Redis, Pipeline etc) are not being traced correctly. Every trace is a tiny fragment of the actual time, occurring around the start time of the redis command being called.
I narrowed this down to the instrumentor for redis not wrapping the async variants as expected (it uses the same sync approach that it uses for the sync redis - and as a result the span only traces the coroutine creation, but not the coroutine actually being awaited).
The result is a very short trace (< 1ms) at the start of the redis call that doesn't actually show the full time of the redis command.
I have fixed this in a follow up PR, which I will put up shortly and link.
Describe your environment
Python version: 3.11
redis-py version: 4.5.5
opentelemetry-instrumentation-redis version: current master or 0.39b0
OS: Ubuntu
Steps to reproduce
Here is an example script, which calls an async redis command, and an async redis pipeline.
For each async call:
The data can then be visualised and the parent span compared to the redis-instrumentor generated span to see that the span doesn't encompass the full time of the command.
Below I have used jaeger to visualise the traces for ease of reading
What is the expected behavior?
Expecting to see 100 milliseconds of a redis command, wrapped by the 150 milliseconds parent span
(This is a screenshot from when I fix the code)
What is the actual behavior?
Actually seeing a really tiny redis command span (< 0.2ms) wrapped by the 150millisecond parent span
(This is a screenshot from the results of the example provided script)
The text was updated successfully, but these errors were encountered: