Skip to content
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

ioredis: two spans are generated for operations in offline queue #288

Open
blumamir opened this issue Dec 21, 2020 · 4 comments
Open

ioredis: two spans are generated for operations in offline queue #288

blumamir opened this issue Dec 21, 2020 · 4 comments
Assignees
Labels
bug Something isn't working never-stale priority:p3 Bugs which cause problems in user apps not related to correctness (performance, memory use, etc)

Comments

@blumamir
Copy link
Member

What version of OpenTelemetry are you using?

v0.13.0

What version of Node are you using?

12

What did you do?

If possible, provide a recipe for reproducing the error.

// instrument application
const Redis = require("ioredis");
const redis = new Redis();
// call set before connection is established
redis.set('foo', 'bar');

What did you expect to see?

As I am calling set function once, so I expect to see a single span\trace with ioredis set operation.

What did you see instead?

Two different spans in two different traces with ioredis set operation.

Additional context

This happens because of ioredis offline queue.
The call to set creates a call to sendCommand which create the first span, but does not send it as redis status is not ready yet, it is instead being pushed to the offline queue.
When ioredis connect to redis, it calls sendCommand again from the offline queue which generate a second span for the same operation.

This can confuse the user, giving the impression that set (or any other operation) was called more times, and in a different context from what the instrumented code was actually calling.

@blumamir blumamir added the bug Something isn't working label Dec 21, 2020
@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Feb 28, 2022
@github-actions
Copy link
Contributor

This issue was closed because it has been stale for 14 days with no activity.

@dyladan dyladan reopened this Mar 28, 2022
@dyladan
Copy link
Member

dyladan commented Mar 28, 2022

Not stale afaik

@dyladan dyladan removed the stale label Mar 28, 2022
@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale label May 30, 2022
@rauno56 rauno56 added the priority:p3 Bugs which cause problems in user apps not related to correctness (performance, memory use, etc) label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working never-stale priority:p3 Bugs which cause problems in user apps not related to correctness (performance, memory use, etc)
Projects
None yet
Development

No branches or pull requests

3 participants