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

TypeError: tracer.getCurrentSpan is not a function #314

Closed
hongbo-miao opened this issue Jan 21, 2021 · 2 comments · Fixed by #315
Closed

TypeError: tracer.getCurrentSpan is not a function #314

hongbo-miao opened this issue Jan 21, 2021 · 2 comments · Fixed by #315
Labels
bug Something isn't working

Comments

@hongbo-miao
Copy link
Contributor

hongbo-miao commented Jan 21, 2021

What version of OpenTelemetry are you using?

0.15.0

What version of Node are you using?

14.15.1

What did you do?

If possible, provide a recipe for reproducing the error.
After upgrading OpenTelemetry to 0.15.0

What did you expect to see?

The app not crash.

What did you see instead?

TypeError: tracer.getCurrentSpan is not a function
    at Redis.sendCommand (/my-app/server/node_modules/@opentelemetry/plugin-ioredis/build/src/utils.js:67:20)
    at Redis.info (/my-app/server/node_modules/ioredis/built/commander.js:111:25)
    at Redis._readyCheck (/my-app/server/node_modules/ioredis/built/redis/index.js:464:10)
    at Socket.<anonymous> (/my-app/server/node_modules/ioredis/built/redis/event_handler.js:54:18)
    at Object.onceWrapper (events.js:421:28)
    at Socket.emit (events.js:327:22)
    at Socket.EventEmitter.emit (domain.js:486:12)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1132:10)
    at TCPConnectWrap.callbackTrampoline (internal/async_hooks.js:129:14)

Additional context

This is because of this change open-telemetry/opentelemetry-js#1764
All plugins using getCurrentSpan need to update to be compatible to new OpenTelemetry 0.15.0

@hongbo-miao hongbo-miao added the bug Something isn't working label Jan 21, 2021
@hongbo-miao hongbo-miao changed the title @opentelemetry/plugin-ioredis breaks in OpenTelemetry 0.15.0 TypeError: tracer.getCurrentSpan is not a function Jan 21, 2021
@Flarna
Copy link
Member

Flarna commented Jan 22, 2021

The plugins in this repo have not yet been updated to 0.15.0. Please use 0.14.0 until a new release is done.

@hongbo-miao
Copy link
Contributor Author

Thanks @Flarna !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants