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 instrumentation span.end getting called twice #2254

Open
peterabbott opened this issue Jun 4, 2024 · 4 comments · May be fixed by #2256
Open

ioredis instrumentation span.end getting called twice #2254

peterabbott opened this issue Jun 4, 2024 · 4 comments · May be fixed by #2256
Assignees
Labels
bug Something isn't working pkg:instrumentation-ioredis priority:p3 Bugs which cause problems in user apps not related to correctness (performance, memory use, etc)

Comments

@peterabbott
Copy link

What version of OpenTelemetry are you using?

"@opentelemetry/instrumentation-ioredis"@0.40.0 (probably earlier ones too)

What version of Node are you using?

20

What did you do?

Enable IORedisInstrumentation class. On error querying Redis, causes warning around calling end on span already ended.

Looking at the code here, end is getting called both on reject but again in the catch.

What did you expect to see?

no errors

What did you see instead?

Messages like the follwing

"@opentelemetry/diag - get TRACE_ID-SPAN_ID - You can only call end() on a span once."

Additional context

There is obviously an issue with our Redis setup, but using the IORedis instrumentation is actually causing issues. When we remove the instrumentation class the issues we see with our Redis go away (as well obviosuly of the error mentioned above).

@peterabbott peterabbott added the bug Something isn't working label Jun 4, 2024
@peterabbott
Copy link
Author

Potentially the utils endSpan method could have a isRecording checking

@AbhiPrasad
Copy link
Member

Opened a PR for this #2256

@pichlermarc
Copy link
Member

@AbhiPrasad can I assign you? 🙂

@pichlermarc pichlermarc added priority:p3 Bugs which cause problems in user apps not related to correctness (performance, memory use, etc) and removed triage labels Jun 19, 2024
@AbhiPrasad
Copy link
Member

@pichlermarc yes please feel free to assign me! I have the fix, just need some advice on how to best test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:instrumentation-ioredis priority:p3 Bugs which cause problems in user apps not related to correctness (performance, memory use, etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants